Personal tools
You are here: Home Documentation FAQs Why does my requested WMS layer not align correctly?

Why does my requested WMS layer not align correctly?

Document Actions
Up to table of contents
Requesting a layer from some ArcIMS WMS connectors results in a map with misalgned data (the aspect ratio of the pixels looks wrong).

Some ArcIMS sites are not set up to stretch the returned image to fit the requested envelope by default. This results in a map with data layers that overlay well in the center of the map, but not towards the edges. This can be solved by adding "reaspect=false" to the request (by tacking it on to the connection string).

For example, if your mapfile is in a projection other than EPSG:4326, the following layer will not render correcly:

LAYER
      NAME "hillshade"
      TYPE RASTER
      STATUS OFF
      TRANSPARENCY 70
      CONNECTIONTYPE WMS
      CONNECTION "http://gisdata.usgs.net:80/servlet19/com.esri.wms.Esrimap/USGS_WMS_NED?"
      PROJECTION
              "init=epsg:4326"
      END
      METADATA
              "wms_srs" "EPSG:4326"
              "wms_title" "US_NED_Shaded_Relief"
              "wms_name" "US_NED_Shaded_Relief"
              "wms_server_version" "1.1.1"
              "wms_format" "image/png"
      END
END

Adding "reaspect=false" to the connection string solves the problem:

LAYER
      NAME "hillshade"
      TYPE RASTER
      STATUS OFF
      TRANSPARENCY 70
      CONNECTIONTYPE WMS
      CONNECTION "http://gisdata.usgs.net:80/servlet19/com.esri.wms.Esrimap/USGS_WMS_NED?reaspect=false"
      PROJECTION
              "init=epsg:4326"
      END
      METADATA
              "wms_srs" "EPSG:4326"
              "wms_title" "US_NED_Shaded_Relief"
              "wms_name" "US_NED_Shaded_Relief"
              "wms_server_version" "1.1.1"
              "wms_format" "image/png"
      END
END

This FAQ applies to: Any version.

by Tim Schaub last modified 2006-03-21 10:04

Powered by Plone