Search code examples
c#gissharpmap

How map longitude and latitude to WGS84 using Sharpmap?


Our program stores address coordinates as latitude longitude (something like 51.215630827;6.7760496559) in the database. I would like to draw map image with some point of interest using SharpMap library.

I guess, those libraries have some methods to convert from one coordinate system to another. Could someone help me, how do i convert Coordinate the best way without reinventing the wheel?


Solution

  • Check the following example https://github.com/SharpMap/SharpMap/blob/Branches/1.0/Examples/ExampleCodeSnippets/ProjectionExamples.cs

    or

    https://github.com/SharpMap/SharpMap/issues/97

    You can also use the NetTopologySuite in order to transform geometries to different Coordinate Systems (https://github.com/NetTopologySuite/NetTopologySuite)