I have a shapefile layer in WGS 84 coordinate system, and want to re-project it to some other CS, for example North Pole Stereographic (ESRI:102018) or North Pole Lambert Azimuthal Equal Area (ESRI:102017).
I use the following code, where I set up source CS (scs) and create target CS (tcs) from WKT.
ProjNet.CoordinateSystems.CoordinateSystemFactory cFac = new ProjNet.CoordinateSystems.CoordinateSystemFactory();
GeoAPI.CoordinateSystems.IGeographicCoordinateSystem scs = ProjNet.CoordinateSystems.GeographicCoordinateSystem.WGS84;
GeoAPI.CoordinateSystems.ICoordinateSystem tcs = cFac.CreateFromWkt("PROJCS[\"North_Pole_Stereographic\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Stereographic\"],PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",0],PARAMETER[\"Scale_Factor\",1],PARAMETER[\"Latitude_Of_Origin\",90],UNIT[\"Meter\",1],AUTHORITY[\"EPSG\",\"102018\"]]");
wrld.CoordinateTransformation = new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory().CreateFromCoordinateSystems(scs, tcs);
I have a shapefile layer in WGS 84 coordinate system, and want to re-project it to some other CS, for example North Pole Stereographic (ESRI:102018) or North Pole Lambert Azimuthal Equal Area (ESRI:102017).
I use the following code, where I set up source CS (scs) and create target CS (tcs) from WKT.
ProjNet.CoordinateSystems.CoordinateSystemFactory cFac = new ProjNet.CoordinateSystems.CoordinateSystemFactory(); GeoAPI.CoordinateSystems.IGeographicCoordinateSystem scs = ProjNet.CoordinateSystems.GeographicCoordinateSystem.WGS84; GeoAPI.CoordinateSystems.ICoordinateSystem tcs = cFac.CreateFromWkt("PROJCS[\"North_Pole_Stereographic\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Stereographic\"],PARAMETER[\"False_Easting\",0],PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",0],PARAMETER[\"Scale_Factor\",1],PARAMETER[\"Latitude_Of_Origin\",90],UNIT[\"Meter\",1],AUTHORITY[\"EPSG\",\"102018\"]]"); wrld.CoordinateTransformation = new ProjNet.CoordinateSystems.Transformations.CoordinateTransformationFactory().CreateFromCoordinateSystems(scs, tcs);But when it comes to CoordinateTransformation, I get an error System.NotSupportedException: Projection Stereographic is not supported. What am I doing wrong?