Cartography Class |
There are 3 levels of coordinates: Geographical coordinates (longitude, latitude) in degrees, projection coordinates (easting, northing), and local/model/user grid coordinates (x,y).
The ProjectionString defines the mapping from geographical coordinates to projection coordinates.
The LatOrigin, LonOrigin and Orientation defines the origin and the orientation of the local grid coordinates. It defines how the local grid coordinate system is translated and rotated. This kind of local grid coordinate system is used for e.g. a 2D grid in a dfs2 file.
See Orientation for the definition of the orientation. The local grid are rotated around its origin.
If LonOrigin is zero, and LatOrigin and ProjectionOrigin(String, Double, Double) matches the origin of the projection coordinate system (from MapProjection), then projection coordinates equals local grid coordinates. Example: UTM-31 has projection origin at (lon,lat) = (3,0).
Namespace: DHI.Projections
The Cartography type exposes the following members.
Name | Description | |
---|---|---|
Cartography(String, Boolean) |
Create and initialize a Cartography object using the
specified projection string.
| |
Cartography(String, Double, Double, Boolean) |
Create and initialize a cartography object using the
specified projection string, setting the origin of the user
defined local grid coordinates to the
lonOrigin, latOrigin | |
Cartography(String, Double, Double, Double, Boolean) |
Create and initialize a cartography object using the
specified projection string, setting the origin of the user
defined local grid coordinates to the
lonOrigin, latOrigin, rotated
orientation.
|
Name | Description | |
---|---|---|
EastOrigin |
Get the origin easting coordinate of the local grid coordinate system.
For geographical map projections ((lon,lat) coordinates), this has no meaning (has the same value as the LonOrigin) | |
LatOrigin |
Get the origin latitude coordinate of the local grid coordinate system.
| |
LonOrigin |
Get the origin longitude coordinate of the local grid coordinate system.
| |
NorthOrigin |
Get the origin northing coordinate of the local grid coordinate system.
For geographical map projections ((lon,lat) coordinates), this has no meaning (has the same value as the LatOrigin) | |
Orientation |
Get the orientation of the local grid coordinate system in the geographical coordinate system.
The orientation is the angle in degrees between true north and the coordinate system y-axis in degrees, measured positive clockwise from true north. | |
OrientationProj |
Get the orientation of the local grid coordinate system in the projected coordinate system.
The orientation is the angle in degrees between projection north and the coordinate system y-axis in degrees, measured positive clockwise from projection north. For geographical map projections ((lon,lat) coordinates), this has no meaning (has the same value as the Orientation) | |
Projection |
Get the map projection that this cartography object uses.
| |
ProjectionName |
The short name of a projection.
The short name is not unique amongst all WKT projections If the ProjectionString is not a WKT projection string, the ProjectionString itself is returned as the short name. | |
ProjectionNorth | Obsolete.
Returns the angle between projection north and a line parallel to the
local grid.
This is NOT the same as the Orientation, the orientation is towards true north, this is towards projection north. | |
ProjectionString |
Returns the WKT projection string, or one of the projection abbreviation strings.
|
Name | Description | |
---|---|---|
CreateGeoOrigin(String, Double, Double, Double) |
Create and initialize a cartography object using the
specified projection string, setting the origin of the user
defined local grid coordinates to the geographic coordinates
lonOrigin, latOrigin, rotated
orientation.
| |
CreateGeoOrigin(String, Double, Double, Double, Boolean) |
Create and initialize a cartography object using the
specified projection string, setting the origin of the user
defined local grid coordinates to the geographic coordinates
lonOrigin, latOrigin, rotated
orientation.
| |
CreateProjOrigin(String, Double, Double, Double) |
Create and initialize a cartography object using the
specified projection string, setting the origin of the user
defined local grid coordinates to the projected coordinates
east, north, rotated
orientationProj towards projection north.
| |
CreateProjOrigin(String, Double, Double, Double, Boolean) |
Create and initialize a cartography object using the
specified projection string, setting the origin of the user
defined local grid coordinates to the projected coordinates
east, north, rotated
orientationProj towards projection north.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Geo2Proj |
Convert coordinates from geographical coordinates to projection coordinates
| |
Geo2Xy |
Convert coordinates from geographical coordinates to local grid x-y coordinates
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetTrueNorth |
Returns the angle between true north and a line parallel to the
local grid y axis passing through (x,y).
The angle is in degrees, measured positive clockwise from true north. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Proj2Geo |
Convert coordinates from projection coordinates to geographical coordinates
| |
Proj2Xy |
Convert coordinates from projetion coordinates to local grid x-y coordinates
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Xy2Geo |
Convert coordinates from local grid x-y coordinates to geographical coordinates
| |
Xy2Proj |
Convert coordinates from local grid x-y coordinates to projection coordinates
|
// The abbreviation for the long WKT projection string utm33String = "UTM-33"; // Create a Cartography object with a local grid origin at lon-lat (17,55) // rotated -45 degrees from true north. Cartography cart = new Cartography(utm33String, 17, 55, -45); double east, north, x, y; // Convert from geographical to map projection coordinates cart.Geo2Proj(17, 55, out east, out north); // Convert from geographical to local grid coordinates cart.Geo2Xy(17, 55, out x, out y);