[mapserver-users] WMS help with dataline issues
pcreso at pcreso.com
pcreso at pcreso.com
Mon Mar 21 22:25:09 PDT 2011
A few possible approaches... for both vector & raster data
Try this at the clent side:
http://openlayers.org/dev/examples/wrapDateLine.html
I have also (in PostGIS) replicated vector data in the western hemisphere so the global dataset extends from -180 to 360.
Also, depending on whether or not you have polygons/linestrings crossing
180, I've used the Postgis shift_longitude() function to resolve this
serverside.
Also, take your +-180 raster map, with a tool like imagemagick, chop it
in half at 180, & create an eastern hemisphere with an extent of
0-180, and two western hemispheres, one with an extent from -180-0 &
one from 180-360. In your map file set all three to status default so
they are always on, or make them members of the same group so they can
be de/selected as a single layer.
There are a few hacks around this, but not many definitive answers.
--- On Tue, 3/22/11, Tim Erwin <taerwin at gmail.com> wrote:
From: Tim Erwin <taerwin at gmail.com>
Subject: [mapserver-users] WMS help with dataline issues
To: mapserver-users at lists.osgeo.org
Date: Tuesday, March 22, 2011, 2:37 PM
I am using raster data from naturalearthdata which is in EPSG:4326 [-180 -90 180 90]. But when requesting data via openlayers with the map centred at 180E it only draws up to 180E. Below is one of the requests from openlayers:
http://localhost/mapserv.cgi?map=naturalearth.map&LAYERS=NE1&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=165,-30,215,20&WIDTH=256&HEIGHT=256
How do I get mapserver to render past 180E (or other options)?
Regards,
Tim
######MAPFILE########
MAP
NAME "NaturalEarth"
IMAGETYPE PNG24
SIZE 800 600
SHAPEPATH "./data"
EXTENT -180 -90 180 90
DEBUG 3
WEB
METADATA
"wms_title" "NaturalEarth WMS"
"wms_srs" "EPSG:4326"
END
END
PROJECTION
"init=epsg:4326"
END
#
# Start of layer definitions
#
LAYER
NAME "NE1"
DATA "NE1_HR_LC_SR_W_DR.tif"
TYPE RASTER
STATUS ON
PROJECTION
"init=epsg:4326"
END
END
END #mapfile
-----Inline Attachment Follows-----
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110321/87d831cb/attachment.htm>
More information about the MapServer-users
mailing list