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

Latitude and Longitude not showing correctly

Apr 25, 2011 at 4:16 PM

Hello,  this should be an easy one for somebody out there.

I must be missing something.  I downloaded and ran the sample project with the "World Countries" shape files and the lat/long appear correct.
Then I changed the code to load my shape file instead of the "World Countries" and the lat/long appear out of wack.

I looked at the samples for transformations and that doesn't seem to apply because the shape files I am using should already have the correct projection that I want.

Can someone give me a nudge in the right direction.  I didn't include code because I believe that I'm missing something with how SharpMap works.

Apr 26, 2011 at 2:12 PM

Hello neutroz,

out of whack is probably what it looks like to you, but to give an answer, you need to describe more precisly what is going on or -even better- show us some images (along with code) or the shapefile in question.

cheers FObermaier

Apr 26, 2011 at 4:21 PM

Sorry - I'm new at this and figured out that that the "World Coordinates" (.ImageToWorld) in SharpMap are UTM.  I need to convert to Lat/Long.

I'll will have to find the necessary math to do the conversion.

Apr 26, 2011 at 7:01 PM

I was able to make the conversion.  Thanks for the help!?

Nov 8, 2012 at 12:36 PM
Edited Nov 9, 2012 at 1:10 PM


I have the same question.

I would like to convert a ImageToWorld point to a WSG84 point or vice versa.

is there a converter available?


I found this page :


I think I need only 

//Create transformation
CoordinateTransformationFactory ctFac = new CoordinateTransformationFactory();
ICoordinateTransformation transform = ctFac.CreateFromCoordinateSystems(source, target);

//Apply transformation to a vectorlayer
(myMap.Layers[0] as VectorLayer).CoordinateTransformation = transform;


but how to create an UTM and WGS84 coordinate system whithout specific (spheric) projection ?



Nov 11, 2012 at 2:19 PM

it's ok.

Map coordinates are not in UTM but in Epsg3785


new CoordinateSystemFactory().CreateFromWkt(                                                                        "PROJCS[\"Popular Visualisation CRS / Mercator\", " +                                                                        "GEOGCS[\"Popular Visualisation CRS\", " +                                                                        "DATUM[\"Popular Visualisation Datum\", " +                                                                        "SPHEROID[\"Popular Visualisation Sphere\", 6378137, 0, AUTHORITY[\"EPSG\",\"7059\"]], " +                                                                        "TOWGS84[0, 0, 0, 0, 0, 0, 0], " +                                                                        "AUTHORITY[\"EPSG\",\"6055\"]], " +                                                                        "PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\", \"8901\"]], " +                                                                        "UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\", \"9102\"]], " +                                                                        "AXIS[\"E\", EAST], AXIS[\"N\", NORTH], " +                                                                        "AUTHORITY[\"EPSG\",\"4055\"]], " +                                                                        "PROJECTION[\"Mercator\"], " +                                                                        "PARAMETER[\"False_Easting\", 0], " +                                                                        "PARAMETER[\"False_Northing\", 0], " +                                                                        "PARAMETER[\"Central_Meridian\", 0], " +                                                                        "PARAMETER[\"Latitude_of_origin\", 0], " +                                                                        "UNIT[\"metre\", 1, AUTHORITY[\"EPSG\", \"9001\"]], " +                                                                        "AXIS[\"East\", EAST], AXIS[\"North\", NORTH], " +                                                                        "AUTHORITY[\"EPSG\",\"3785\"]]");