Check projection of Shapefile

Topics: SharpMap Project, SharpMap v0.9 / v1.x, SharpMap v2.0, WinForms Controls
Oct 25, 2013 at 4:58 AM
Hi,

I had created a tool where the user can upload any shapefile and it gets displayed.The shapefile should be in WGS_1984_Web_Mercator, so i need to prompt the user to reproject the data if it is not WGS_1984_Web_Mercator.

So i need a solution for how to read the projection of shapefile.

Regards
Arun Mohan
Coordinator
Oct 25, 2013 at 7:53 AM
You should have *.prj file associated with your shapefile. It contains the (ESRI-)WKT of the spatial reference system used in the shapefile.
If you don't have that, you can only guess.
Oct 25, 2013 at 9:19 AM
Hi,

Thanks for your reply.I need to check if the projection is not WGS_1984_Web_Mercator, and prompt user to reproject. Do i need to use streamreader to check or is there any other method.

Regards
Arun Mohan