Project a [0 360> dataset in [-180 180> domain

A.Th.C. Hulst hulst at ARGOSS.NL
Sat Jul 21 14:56:35 EDT 2007


On Saturday 21 July 2007 14:26:27 Brent Wood wrote:
> --- "A.Th.C. Hulst" <hulst at ARGOSS.NL> wrote:
> > Hello,
> >
> > I wondered if it is possible to get mapserv as far as showing a map from
> > [-180
> > 180> while to original dataset is [0 360>. My attempts only show data
> > from [0 180>.
>
> It will show data from -180 t0 o if you scroll left enough.
>
> There is no way to do this easily. I use a PostGIS table with two geometry
> columns, one in each longitude space. Points are easy to convert, but lines
> & polygons that cross 180 need to be joined/merged while those that cross 0
> need to be split. So it is not just a simple reprojection, but als includes
> a merging or splitting of affected features crossing the 0/180 meridians.
>
> I also achieve the same result by cutting the wester hemisphere of data,
> translate it by 360 degrees & paste it onto the 0-180 geometry column, so
> the column goes from 0-360, 1 1/2 times around, which gives a reasonably
> seamless map at the cost of some redundant data.
>
> I have found a few ways with PostGIS to work around this problem, but no
> simple solutions.
>
> Raster data is also a problem, under Linux a symlink to tiles in the
> eastern hemisphere with accomapnying world files seems to work OK, so there
> is a -180 to 360 cover, without replicating images or tiles, just the extra
> world files.
>
> > That relates a bit to my next wish; can mapserver zoom cyclic? When I
> > zoom in
> >
> > on 360, I want to see data from 320 to 360(-dx) and 0 to 40 degrees. Is
> > this possible with current implementations?
>
> As above, yes, if your dataset is -180 to 360.
I was afraid that this was the answer ;)

My hope was that I didn't need to fiddle with the data as I have a fresh 
dataset every 6 hours. Ah well....

Thanks.

>
>
> Cheers,
>
>   Brent Wood
>
> > Regards,
> > Sander



More information about the mapserver-users mailing list