Wraping raster images
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Sun Jun 19 09:49:05 PDT 2005
Hello Emese,
There are two problems with this:
1) panning east-west and wrapping about the international date-line.
You might be able to solve the east-west problem by making a an extra
virtual copy of the images on the east and west side of the main images.
You could avoid duplicating the data by using symlinks if you are on
linux, then I would create .wld files for the east and west copies that
make them appear as 180 plus or minus the orginial set. so now you can
pan an other 360 degrees past the the date-line in either direction.
Then I would make a small change to you application to add/sub 180 if
the center of the map moves beyond +- 360
This should make the user feel like they can pan east or west forever.
2) panning north-south and wrapping about the poles.
This is a little more problematic because if you pan north-south over
the pole the map image would be upside down. But the same idea might
work and if you setup your world file appropriately, I think the image
might get flipped upside down as expected.
I haven't tried any thing like this, but this would be how I would try.
Others might give you a clue as to where this might work. Let us know
and send a link if you get it working. You might want to try it with a
very simple example with a single image.
-Steve W.
EAA Csete wrote:
> I'd like to be able to wrap a raster image so that on a global map,
> users do not off the edge and get white space. It seems this question
> cam up a couple of years ago and the response was - not easily!
>
> Has anyone discovered a (not too complicated!) way of doing this
> since then?
>
> Any ideas most welcome!
>
> Emese
>
More information about the MapServer-users
mailing list