Click or drag to resize

MzCartography Class

Note: This API is now obsolete.

A cartography object handles a map projection and a local grid that can be translated and rotated compared to the projected coordinate system.

There are 3 levels of coordinates: Geographical coordinates (longitude, latitude) in degrees, projection coordinates (easting, northing), and model/user grid coordinates (x,y).

The ProjectionString defines the mapping from geographical coordinates to projection coordinates. See MzMapProjection for details on the projection string.

The LonOrigin, LatOrigin and Orientation defines the origin and the orientation of the model grid coordinates. It defines how the model grid coordinate system is translated and rotated, and is used to define a local coordinate system for e.g. a 2D grid axis from a dfs2 file.

See Orientation for the definition of the orientation. The model coordinates are rotated around its origin.

If Orientation is zero, and LonOrigin and LatOrigin matches the origin of the projection coordinate system (from ProjectionOrigin(String, Double, Double)), then projection coordinates equals model grid coordinates. Example: UTM-31 has projection origin at (lon,lat) = (3,0).

Inheritance Hierarchy
SystemObject
  DHI.Generic.CartographyMzCartography

Namespace:  DHI.Generic.Cartography
Assembly:  DHI.Generic.MIKEZero.DFS (in DHI.Generic.MIKEZero.DFS.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
[ObsoleteAttribute("Use new DHI.Projections library")]
public class MzCartography

The MzCartography type exposes the following members.

Constructors
  NameDescription
Public methodMzCartography(String)
Create and initialize a cartography object using the specified projection string.
Public methodMzCartography(String, Double, Double)
Create and initialize a cartography object using the specified projection string, setting the origin of the user defined model coordinates to the lonOrigin, latOrigin
Public methodMzCartography(String, Double, Double, Double)
Create and initialize a cartography object using the specified projection string, setting the origin of the user defined model coordinates to the lonOrigin, latOrigin, rotated orientation.
Top
Properties
  NameDescription
Public propertyLatOrigin
Get the origin latitude coordinaet of the model grid coordinate system.
Public propertyLonOrigin
Get the origin longitude coordinaet of the model grid coordinate system.
Public propertyOrientation
Get the orientation of the model grid coordinate system.

The orientation is the angle in degrees between true north and the coordinate system y-axis in deg., measured positive clockwise.

Public propertyProjection
Get the map projection that this cartography object uses.
Public propertyProjectionName
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.

Public propertyProjectionNorth
Returns the angle between projection north and a line parallel to the model grid.

This is NOT the same as the Orientation, the orientation is towards true north, this is towards projection north.

Public propertyProjectionString
Returns the WKT projection string, or one of the projection abbreviation strings.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGeo2Proj
Convert coordinates from geographical coordinates to projection coordinates
Public methodGeo2Xy
Convert coordinates from geographical coordinates to model x-y coordinates
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetTrueNorth
Returns the angle between true north and a line parallel to the model grid passing through (x,y).
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodProj2Geo
Convert coordinates from projection coordinates to geographical coordinates
Public methodProj2Xy
Convert coordinates from projetion coordinates to model x-y coordinates
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodXy2Geo
Convert coordinates from model x-y coordinates to geographical coordinates
Public methodXy2Proj
Convert coordinates from model x-y coordinates to projection coordinates
Top
See Also