There was an error while loading. Please reload this page.
string wkt = "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.0174532925199433]]"; GeoAPI.CoordinateSystems.ICoordinateSystem cs = ProjNet.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt) as GeoAPI.CoordinateSystems.ICoordinateSystem;
If you know that the WKT is for instance a geographic coordinate system as above, you can instead cast it to that if necessary:
GeoAPI.CoordinateSystems.IGeographicCoordinateSystem gcs = ProjNet.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt_geo) as GeoAPI.CoordinateSystems.IGeographicCoordinateSystem;
and similar for a projected coordinate system:
GeoAPI.CoordinateSystems.IProjectedCoordinateSystem pcs = ProjNet.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt_proj) as GeoAPI.CoordinateSystems.IProjectedCoordinateSystem;