Click or drag to resize

CoordinateReferenceSystemParse Method

Creates and initializes a coordinate reference system.

Namespace:  Ptv.Components.Projections
Assembly:  Ptv.Components.Projections (in Ptv.Components.Projections.dll) Version: 1.7.10.0
Syntax
public static CoordinateReferenceSystem Parse(
	string wkt,
	bool lazy = false
)

Parameters

wkt
Type: SystemString
CRS parameters, specified as Proj4 well known text.
lazy (Optional)
Type: SystemBoolean
Specifies if the transformation handles are to be created immediately or on demand.

Return Value

Type: CoordinateReferenceSystem
Returns the newly created CoordinateReferenceSystem instance.
Remarks
The identifier of a CRS is not needed to create and initialize the CoordinateReferenceSystem. The identifier comes into play when storing the CRS in the Registry.
Examples
The following is an example of creating a WGS84 like coordinate reference System:
// EPSG:4326, as taken from www.spatialreference.org
string wkt = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";

// create CRS
CoordinateReferenceSystem crs = CoordinateReferenceSystem.Parse(wkt);

// use CRS
...
See Also