Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
caidc opened this issue Sep 25, 2024 · 0 comments
Open

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

caidc opened this issue Sep 25, 2024 · 0 comments

Comments

@caidc
Copy link

caidc commented Sep 25, 2024

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 });`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant