-
Notifications
You must be signed in to change notification settings - Fork 18
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
Can you read .prj to create SpatialReference? #56
Comments
I've created a sample code that demonstrates how to read the .prj file and create a spatial reference for transforming shapefile coordinates to WGS84. You can find the implementation here. Let me know if you need any further assistance. |
Thanks for your quick reply.
My shapefile projection is
shapefile.Projection (created in ArcGISPro).
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]
var transformation =
transformationFactory.CreateFromCoordinateSystems(sourceCs, targetCs);
throws exception:
'Projection Mercator_Auxiliary_Sphere is not supported. I'm really
surprised by this exception.
Thanks.
Tosa
…On Sat, Sep 7, 2024 at 4:28 AM Kuba Szostak ***@***.***> wrote:
I've created a sample code that demonstrates how to read the .prj file and
create a spatial reference for transforming shapefile coordinates to WGS84.
You can find the implementation here
<https://github.com/NetTopologySuite/NetTopologySuite.IO.Esri/blob/develop/test/NetTopologySuite.IO.Esri.Test/Issues/Issue056.cs>.
Let me know if you need any further assistance.
—
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMZ36QSB7EVYAE6FQ5SZWTTZVK2JLAVCNFSM6AAAAABNRILVFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZVGEYTOMJQHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
See also: NetTopologySuite/ProjNet4GeoAPI#125 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In order to use the polygon geometry in shapefile, you have to know the (projection spatial reference) in order to translate shapefile coordinates to WGS84. Can you point me a way to read .prj to create a spatial reference? Thanks.
The text was updated successfully, but these errors were encountered: