Crossing the date line?

Frank Warmerdam warmerdam at POBOX.COM
Tue Dec 5 15:00:51 EST 2006


Gregor Mosheh wrote:
> Hi, all.
> 
> W're investigating how best to handle data which crosses the date line. I
> see some very old postings about known bugs back in 2001, but couldn't
> find anything recent. Perhaps y'all could fill me in on the modern
> perspective?
> 
> We're looking at 3 cases:
> - remote WMS
> - vector (PostGIS)
> - locally stored GeoTIFFs
> 
> How can we have Mapserver (better yet, PHP/Mapscript because that's what
> we're using) gracefully handle data that's at opposite ends of the
> -180/180 rectangle? We do not have the option of massaging the data,
> moving the map features to the other end of the earth; the data has to
> stay as-is.
> 
> Any thoughts? I found surprisingly little about this in Google and Clusty,
> aside from mentions of "don't do that" in mapserv.js
> 
> One idea that has occurred to me, since we're using Mapscript, is to
> detect urx<llx and then generate two images and paste the images together.
> Yuck.

Gregor,

Is your objective to handle map rendering requests that cross the dateline
for map data that fill the whole -180 to 180 longitude range but stays within
it?  If so, splitting cross datelines requests into two renders as you suggest
would be a good solution.

What coordinate system is your map in?  What coordinate system is the data
in?  Some dateline related issues arise when MapServer is needing to
reproject things.   If everything is in WGS84 (data and requests) then
that at least simplifies the issues somewhat.

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