Hello,
I have an existing project that uses a map in Decimal Degrees. This project supports Points, Shape Files, GeoTIFF and ArcGIS.
I now want to use Open Street Maps as my base layer, but I’m running into an issue with projecting OSM to Decimal Degrees. The issue is that when I plot something using lat/long, it is appears on OSM offset to the lower right of where it should be. For example, if I place a point in Washington, D.C., it shows on OSM just below Andrews Airforce base. The same issues occurs with Shape Files, GeoTiff and ArcGIS.
Here is the code I’m using to set up the OSM projection from meters to decimal degrees:
winformsMap1.MapUnit = GeographyUnit.DecimalDegree;
OpenStreetMapLayer layer = new OpenStreetMapLayer();
string internalProjString = Proj4Projection.GetGoogleMapParametersString();
string externalProjString = Proj4Projection.GetDecimalDegreesParametersString();
Proj4Projection projection = new Proj4Projection(internalProjString, externalProjString);
projection.Open();
layer.ProjectionFromSphericalMercator = projection;
Any suggestions you can provide would be appreciated.
Scott