[mapserver-users] WMS layers from multiple projections?

Dylan Keon keon at nacse.org
Fri Nov 22 11:49:44 PST 2002


Hi listers,

Short version:
Is it possible to integrate WMS layers from multiple projections into a 
single interface, reprojecting on the fly to match local data?

Long version:
The "WMS Client HOWTO" page hints that it's possible to reproject WMS 
layers on the fly, as long as GDAL support is compiled into MapServer, 
but I can't seem to get it to work.  My local data are in NAD27 UTM zone 
10.  Data I'm retrieving from a WMS server are in NAD83 UTM zone 10. 
I'd also like to retrieve data that are in other projections, but for 
now I'm just trying to get this working.

It seems the epsg code in the map's PROJECTION object must match the 
"wms_srs" epsg code in the WMS layer's METADATA definition.  If they do 
not match, like this (abbreviated mapfile info):

   PROJECTION
     "init=epsg:26710" #NAD27 UTM zone 10N
     #"init=epsg:26910" #NAD83 UTM zone 10N
   END

   LAYER
     METADATA
       "wms_srs" "EPSG:26910" #NAD83 UTM zone 10N
     END
   END

then the request sent to the WMS server does not contain the correct BBOX:

   http://terraservice.net/ogcmap.ashx?VERSION=1.1.1&SERVICE=wms
   &LAYERS=DOQ&FORMAT=png&styles=&REQUEST=GetMap&WIDTH=480&HEIGHT=320
   &SRS=EPSG:26910&BBOX=53325378.627243,0.000000,53325378.627243,0.000000
   &EXCEPTIONS=application/vnd.ogc.se_inimage

If the epsg codes are both set to 26910 (NAD83), then the correct BBOX 
is generated and everything works, except that the datum shift is 
apparent in the map image due to the combination of NAD27 and NAD83 
data.  I tested this by overlaying both NAD83 and NAD27 versions of a 
streams layer on top of the WMS DOQ image.  The NAD83 layer lines up 
great with the DOQ, but the NAD27 layer is noticeably shifted.

I also tried defining the PROJECTION object under the WMS layer 
definition with both epsg codes (and also just not defining it), but it 
doesn't make a difference (and the HOWTO page says it's optional).

I'm currently using 3.7, but saw the same behavior in 3.6.3.

# ./mapserv -v
MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=PDF SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT INPUT=EPPL7 INPUT=JPEG 
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Thanks for any hints. :-)

Dylan

-- 
************************************************
  Dylan Keon
  GIS/Database Research Specialist
  Northwest Alliance for Computational
  Science and Engineering (NACSE)
  Oregon State University
  Corvallis, OR 97331
  keon at nacse.org        (541) 737-6608
************************************************




More information about the MapServer-users mailing list