This project has moved and is read-only. For the latest updates, please go here.

Can I add a shape file of other projection to SharpMap?

Topics: Algorithms
Sep 13, 2007 at 12:54 AM
I got a new shape file (. shp), whose projection is Mercator projection or other projection, but I can not add it to the SharpMap. Specifically, in the class MapHelper, I changed the datasource of layer into the directory of new shape file, but the ShapeMap will not display the file. I will appreciate it if someone help solve it. Thanks in advance.
Sep 17, 2007 at 2:30 AM
Hi Kyle,

You need to know the projection of each shapefile, so that SharpMap can compute the transformation from one projection to the other. Do you know both projections?
Sep 19, 2007 at 4:22 PM

Thank you very much for your answer.

Firstly, the projection of new shape files is Mercator. I think it is the projection of Google map, but I am not sure.

Secondly, my project is web-based application. I tried to add this shape file into Sharpmap, and use this shape file to render the map in the page of Ajax, but I failed.

Third, if I used the shape files, whose coordination system is Geographic coordination system, I can add the map to the page of Ajax successfully.

Would you please give me some suggestion or solution? Thank you in advance.
Sep 23, 2007 at 10:40 PM
Mercator is also a GeographicCoordinateSystem. What you need to do is to convert the shapefile's coordinate system to the Mercator projection. Do you have a .prj file for the shapefile?
Sep 24, 2007 at 4:01 PM

I greatly appreciate your answer. The following is the .prj file of shapefile:


Actually, this shapefile comes from the original shapefile of SharpMap. I transform the projection of original shapefile (of SharpMap) by using MapWinGIS.

I have little knowledge about GIS. This question truly baffles me. Thanks for your help.



Sep 24, 2007 at 8:58 PM
Hi Kyle -

It looks like the shapefile is a Mercator projection as well. The only difference is that Google maps uses a spherical representation of the earth and the shapefile uses a slightly flattened sphere known as an oblate spheroid (or ellipsoid). This causes errors in the projection used, but whether the errors are big or not depends on what you are doing.

Morten, the initiator of SharpMap, has a good article about the terminology and concepts of projections and earth models which will probably help you understand the problem a bit better.

What did you reproject it to using MapWinGIS?