|
1 | | -// Copyright 2005, 2006 - Morten Nielsen (www.iter.dk) |
2 | | -// |
3 | | -// This file is part of SharpMap. |
4 | | -// SharpMap is free software; you can redistribute it and/or modify |
5 | | -// it under the terms of the GNU Lesser General Public License as published by |
6 | | -// the Free Software Foundation; either version 2 of the License, or |
7 | | -// (at your option) any later version. |
8 | | -// |
9 | | -// SharpMap is distributed in the hope that it will be useful, |
10 | | -// but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | | -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | | -// GNU Lesser General Public License for more details. |
13 | | - |
14 | | -// You should have received a copy of the GNU Lesser General Public License |
15 | | -// along with SharpMap; if not, write to the Free Software |
16 | | -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 | | - |
18 | | -using System; |
19 | | -using System.Globalization; |
20 | | - |
21 | | -namespace GeoAPI.CoordinateSystems |
22 | | -{ |
23 | | - /// <summary> |
24 | | - /// A named projection parameter value. |
25 | | - /// </summary> |
26 | | - /// <remarks> |
27 | | - /// The linear units of parameters' values match the linear units of the containing |
28 | | - /// projected coordinate system. The angular units of parameter values match the |
29 | | - /// angular units of the geographic coordinate system that the projected coordinate |
30 | | - /// system is based on. (Notice that this is different from <see cref="Parameter"/>, |
31 | | - /// where the units are always meters and degrees.) |
32 | | - /// </remarks> |
33 | | -#if !PCL |
34 | | - [Serializable] |
35 | | -#endif |
36 | | - public class ProjectionParameter |
37 | | - { |
38 | | - /// <summary> |
39 | | - /// Initializes an instance of a ProjectionParameter |
40 | | - /// </summary> |
41 | | - /// <param name="name">Name of parameter</param> |
42 | | - /// <param name="value">Parameter value</param> |
43 | | - public ProjectionParameter(string name, double value) |
44 | | - { |
45 | | - _Name = name; |
46 | | - _Value = value; |
47 | | - } |
48 | | - |
49 | | - |
50 | | - private string _Name; |
51 | | - |
52 | | - /// <summary> |
53 | | - /// Parameter name. |
54 | | - /// </summary> |
55 | | - public string Name |
56 | | - { |
57 | | - get { return _Name; } |
58 | | - set { _Name = value; } |
59 | | - } |
60 | | - |
61 | | - private double _Value; |
62 | | - |
63 | | - /// <summary> |
64 | | - /// Parameter value. |
65 | | - /// The linear units of a parameters' values match the linear units of the containing |
66 | | - /// projected coordinate system. The angular units of parameter values match the |
67 | | - /// angular units of the geographic coordinate system that the projected coordinate |
68 | | - /// system is based on. |
69 | | - /// </summary> |
70 | | - public double Value |
71 | | - { |
72 | | - get { return _Value; } |
73 | | - set { _Value = value; } |
74 | | - } |
75 | | - |
76 | | - /// <summary> |
77 | | - /// Returns the Well-known text for this object |
78 | | - /// as defined in the simple features specification. |
79 | | - /// </summary> |
80 | | - public string WKT |
81 | | - { |
82 | | - get |
83 | | - { |
84 | | - return String.Format(CultureInfo.InvariantCulture.NumberFormat, "PARAMETER[\"{0}\", {1}]", Name, Value); |
85 | | - } |
86 | | - } |
87 | | - |
88 | | - /// <summary> |
89 | | - /// Gets an XML representation of this object |
90 | | - /// </summary> |
91 | | - public string XML |
92 | | - { |
93 | | - get |
94 | | - { |
95 | | - return String.Format(CultureInfo.InvariantCulture.NumberFormat, "<CS_ProjectionParameter Name=\"{0}\" Value=\"{1}\"/>", Name, Value); |
96 | | - } |
97 | | - } |
98 | | - |
99 | | - public override string ToString() |
100 | | - { |
101 | | - return string.Format("ProjektionParamter '{0}': {1}", Name, Value); |
102 | | - } |
103 | | - } |
104 | | -} |
| 1 | +// Copyright 2005, 2006 - Morten Nielsen (www.iter.dk) |
| 2 | +// |
| 3 | +// This file is part of SharpMap. |
| 4 | +// SharpMap is free software; you can redistribute it and/or modify |
| 5 | +// it under the terms of the GNU Lesser General Public License as published by |
| 6 | +// the Free Software Foundation; either version 2 of the License, or |
| 7 | +// (at your option) any later version. |
| 8 | +// |
| 9 | +// SharpMap is distributed in the hope that it will be useful, |
| 10 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +// GNU Lesser General Public License for more details. |
| 13 | + |
| 14 | +// You should have received a copy of the GNU Lesser General Public License |
| 15 | +// along with SharpMap; if not, write to the Free Software |
| 16 | +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | + |
| 18 | +using System; |
| 19 | +using System.Globalization; |
| 20 | + |
| 21 | +namespace GeoAPI.CoordinateSystems |
| 22 | +{ |
| 23 | + /// <summary> |
| 24 | + /// A named projection parameter value. |
| 25 | + /// </summary> |
| 26 | + /// <remarks> |
| 27 | + /// The linear units of parameters' values match the linear units of the containing |
| 28 | + /// projected coordinate system. The angular units of parameter values match the |
| 29 | + /// angular units of the geographic coordinate system that the projected coordinate |
| 30 | + /// system is based on. (Notice that this is different from <see cref="Parameter"/>, |
| 31 | + /// where the units are always meters and degrees.) |
| 32 | + /// </remarks> |
| 33 | +#if !PCL |
| 34 | + [Serializable] |
| 35 | +#endif |
| 36 | + public class ProjectionParameter |
| 37 | + { |
| 38 | + /// <summary> |
| 39 | + /// Initializes an instance of a ProjectionParameter |
| 40 | + /// </summary> |
| 41 | + /// <param name="name">Name of parameter</param> |
| 42 | + /// <param name="value">Parameter value</param> |
| 43 | + public ProjectionParameter(string name, double value) |
| 44 | + { |
| 45 | + _Name = name; |
| 46 | + _Value = value; |
| 47 | + } |
| 48 | + |
| 49 | + |
| 50 | + private string _Name; |
| 51 | + |
| 52 | + /// <summary> |
| 53 | + /// Parameter name. |
| 54 | + /// </summary> |
| 55 | + public string Name |
| 56 | + { |
| 57 | + get { return _Name; } |
| 58 | + set { _Name = value; } |
| 59 | + } |
| 60 | + |
| 61 | + private double _Value; |
| 62 | + |
| 63 | + /// <summary> |
| 64 | + /// Parameter value. |
| 65 | + /// The linear units of a parameters' values match the linear units of the containing |
| 66 | + /// projected coordinate system. The angular units of parameter values match the |
| 67 | + /// angular units of the geographic coordinate system that the projected coordinate |
| 68 | + /// system is based on. |
| 69 | + /// </summary> |
| 70 | + public double Value |
| 71 | + { |
| 72 | + get { return _Value; } |
| 73 | + set { _Value = value; } |
| 74 | + } |
| 75 | + |
| 76 | + /// <summary> |
| 77 | + /// Returns the Well-known text for this object |
| 78 | + /// as defined in the simple features specification. |
| 79 | + /// </summary> |
| 80 | + public string WKT |
| 81 | + { |
| 82 | + get |
| 83 | + { |
| 84 | + return String.Format(CultureInfo.InvariantCulture.NumberFormat, "PARAMETER[\"{0}\", {1}]", Name, Value); |
| 85 | + } |
| 86 | + } |
| 87 | + |
| 88 | + /// <summary> |
| 89 | + /// Gets an XML representation of this object |
| 90 | + /// </summary> |
| 91 | + public string XML |
| 92 | + { |
| 93 | + get |
| 94 | + { |
| 95 | + return string.Format(CultureInfo.InvariantCulture.NumberFormat, "<CS_ProjectionParameter Name=\"{0}\" Value=\"{1}\"/>", Name, Value); |
| 96 | + } |
| 97 | + } |
| 98 | + |
| 99 | + /// <summary> |
| 100 | + /// Function to get a textual representation of this envelope |
| 101 | + /// </summary> |
| 102 | + /// <returns>A textual representation of this envelope</returns> |
| 103 | + public override string ToString() |
| 104 | + { |
| 105 | + return string.Format("ProjectionParameter '{0}': {1}", Name, Value); |
| 106 | + } |
| 107 | + } |
| 108 | +} |
0 commit comments