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

WMS and Polar Stererographic Projection

Topics: SharpMap Project
Nov 28, 2011 at 2:03 PM
Edited Nov 28, 2011 at 2:10 PM

Hi there.

I'd like to serve LIMA data ( via SharpMap as a WMS. Now the whole point of LIMA data, is that you look at the South Pole from the centre, so it becomes a bit of a circle (Polar Stereographic projection - EPSG: 3031).

The problem is that I have no idea how to change the demo application to be able to load this data. The file I downloaded is a geotiff ( If I open the image using the DotSpatials GUI project, then I can see that the coordinates are, as expected, not normal degrees, but rather values in the millions (i'm not sure of the correct term for this).

In the SharpMap DemoWebSite project, I thought I would need to modify the "InitializeWmsMap" method inside "AppCode/MapHelper" so that it would load the LIMA geotiff. I tried to create a GdalRasterLayer, and gave it a made up layer name, and the path to the file on disc

GdalRasterLayer rasterLayer = new GdalRasterLayer("MadeUpLayerName", @"C:\LIMA.tif"); 

What I have not done is specified a CoordinateTransform, as I really don't know if I need to. If I do, in the samples I saw, you needed to specify a source and target transform. I want to view the map as it it in polar stereographic I would assume (i.e. centered over Antarctica), so would I need to transform? Also, I don't know where to centre the map over in order to see data. Am I going along the correct approach here?


Please help if you can, i'm really struggling as this is my first time playing with SharpMap.



Nov 28, 2011 at 2:35 PM
Edited Nov 28, 2011 at 2:40 PM

You only need a coordinate transformation if you want to overlay data that has a different coordinate reference system.

Since you currently cannot reproject the raster (at least it is not advised to do so), you would have to transform the vector data anyway.

If Proj.Net cannot handle the EPSG:3031, you may need to implement Polar Stereographic projection yourself.

Hth FObermaier

Nov 28, 2011 at 2:38 PM

Thanks for the reply. The problem is that I don't see any map, just a blue background (well, different shades of blue). How do I figure out where to centre my map?

Nov 28, 2011 at 2:39 PM

And do I need to tell SharpMap the extents of the map somehow? Or will it read this from the geoTiff?

Nov 28, 2011 at 4:07 PM

All you need to do is map.ZoomToExtents() if you want to show the whole layer.

If you want to move to a specific part you can call map.ZoomToBox(boundingBox)

Hth FObermaier

Nov 30, 2011 at 7:52 AM

Thanks for the assistance FObermaier.