ProjNet4GeoAPI icon indicating copy to clipboard operation
ProjNet4GeoAPI copied to clipboard

WGS84(EPSG4326)坐标转CGCS2000 108E(EPSG:4545)

Open caidc opened this issue 1 year ago • 0 comments

I know the seven parameters from the WGS84 geographical coordinate system to the CGCS2000 projection coordinate system for a certain area. I declare the coordinate system and set its seven parameters according to the following method, and then build a coordinate conversion function. The result of the coordinate conversion is almost consistent with that when the seven parameters are not set. `sevenParams = new Wgs84ConversionInfo(***, ***, ***, **, **, **, ***);

var wgs84GCS = SRIDReader.GetCSbyID(4326) as GeographicCoordinateSystem; //GCS WGS84 wgs84GCS.HorizontalDatum.Wgs84Parameters = sevenParams;

var cgcs2000 = SRIDReader.GetCSbyID(4539) as ProjectedCoordinateSystem; //CGCS2000 108E cgcs2000.HorizontalDatum.Wgs84Parameters = sevenParams; var wgs84GCS_To_cgcs2000 = new CoordinateTransformationFactory().CreateFromCoordinateSystems(wgs84GCS, cgcs2000); double[] pointPlane = wgs84GCS_To_cgcs2000.MathTransform.Transform(new double[3] { (double)model.Longitude, (double)model.Latitude, 0 });`

caidc avatar Sep 25 '24 07:09 caidc