[Mapserver-users] Wrapping a RASTER layer around

woodbri at swoodbridge.com woodbri at swoodbridge.com
Sun Jul 6 12:14:36 EDT 2003


I don't think it can be done easily. The problem is a little more 
complicated in that the coordinate space goes from 0 degrees at 
Greenwich to plus/minus 180 as you travel east or west so the space 
to the right of Japan is > 180 E which is not the same as < -180 
West! OK well is it the same space the the math is not the same and 
all the code would have to do tests and transforms to normalize the 
data to the display box or alternatively one would have to recognize 
the the image space is really two separate images that would both 
need to be rendered on to part of the image, one for that which is > 
180 E and the other that is < -180 W. This could also get more 
complicated if the user kept pan right forever so you would have to 
decide when to renormalize miny maxy values as you wrap around the 
360 degrees mark.

Then again there may be an easier way that I haven't thought about.

-Steve W.

On 6 Jul 2003 at 17:29, poff wrote:

> I wonder if there is a simple fix for this.
> 
> When panning on a map, is there any way to "wrap around" the data so
> that, for example on the world, if a user was to pan right of japan,
> they would end up seeing the US instead of lots of blank space where
> the rectangular data ends?
> 
> I could of course do this "manually" by checking the extent in my
> script and changing it, but is there another (automatic)  behaviour
> that I'm missing out on? Maybe I could just do a
> if(extent>map_extent); calc which way they should be redirected and do
> it; fi
> 
> Thanks for any ideas,
> -- 
> poff at sixbit.org
> SDF Public Access UNIX System - http://sdf.lonestar.org
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 





More information about the mapserver-users mailing list