AW: [UMN_MAPSERVER-USERS] problem with polar projection

Arnd Wippermann arndw at WTAL.DE
Tue Dec 11 16:50:12 EST 2007


Hi,

It should be possible to retrieve the data:
http://www.panoramio.com/photo/6431496. 

My mapfile have nothing special. I use OpenLayers, therefor the map is build
from a couple of tiles and not a single image, but that should not cause any
problems or is this the point of your hint.
 
Mit freundlichen Grüssen

Arnd Wippermann
http://gis.ibbeck.de/ginfo/



-----Ursprüngliche Nachricht-----
Von: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Im
Auftrag von Frank Warmerdam
Gesendet: Dienstag, 11. Dezember 2007 14:55
An: MAPSERVER-USERS at LISTS.UMN.EDU
Betreff: Re: [UMN_MAPSERVER-USERS] problem with polar projection

JS Ubei wrote:
> dear all mapserver users,
> 
> I'm trying to display a map with the EPSG:3031 projection system.
> 
> I use the GSHHS shape for shorelines and I want to see it centered on 
> the antarctic continent.
> 
> Below my map file and a link to the resulted image.
> As you can shown the problem is a big hole of data around  the pole.
> 
> In advance, thanks for your help.

Jsubei,

The problem that occurs in cases like yours is that MapServer reprojects
your map rectangle into lat/long (EPSG:4326) in order to do a spatial query
on the vector features.  But it reprojects the rectangle by reprojecting a
bunch of points around the edge of the rectangle, and using the result to
get a bounding rectangle in the target projection.  But unfortunately none
of the locations around the edge of your pole centered projection are very
far north so the resulting bounding box query misses most of the data.

My suggestion is to just reproject the shoreline vectors in advance into
your polar projection.

If you really want to do it the way you have it setup, then the code to look
at to improve the rectangle reprojection logic is msProjectRect() in
mapproject.c. You will see it first tries to reproject points around the
edge.  If any of those fail it will reproject a sampling of points within
the rectangle to compute bounds.  You could modify this to always sample in
the box for your build for instance by initializing 'failure'
to 1 instead of 0.

Best regards,
-- 
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list