[mapserver-users] WMS raster reprojection problems: EPSG:4326 to EPSG:2163 for Alaska

Jennifer L Martin jlmartin at usgs.gov
Wed Mar 6 11:50:00 PST 2013


I was wondering if I could get some advice on a problem I am having with 
on-the-fly reprojection of a raster map layer. We are using Mapserver 
6.0.0. Our raster images are GeoTiffs. All our source data is EPSG:4326 
and we have the WMS set up to support a number of other output 
projections, including  EPSG:2163 (US National Atlas Equal Area). 
However, the image from a GetMap request, when specifying the output 
projection of EPSG:2163, gets really pixely/blocky when you are zoomed 
in to the western part of Alaska near the international date line.

The image is fine if you are zoomed in to eastern Alaska; the problem 
only occurs when the image includes the northern and/or western parts of 
Alaska, especially images that get close to the date line and the Arctic 
circle.

I tried changing the projection to:
"proj=latlong" "ellps=WGS84" "datum=WGS84" "+over"
on the off chance that it would help, but no luck.

Does anybody have suggestion to help resolve this?

Here is the layer map file.
=======
MAP
   OUTPUTFORMAT
     NAME          "png"
     DRIVER        AGG/PNG
     MIMETYPE      "image/png"
     IMAGEMODE     RGBA
     EXTENSION     "png"
     TRANSPARENT   ON
   END

   OUTPUTFORMAT
     NAME          "jpeg"
     DRIVER        AGG/JPEG
     MIMETYPE      "image/jpeg"
     IMAGEMODE     RGB
     EXTENSION     "jpg"
     FORMATOPTION  "GAMMA=0.75"
   END

   WEB
     METADATA
       "wms_onlineresource" "http://<internal_ip_address>/wms?"
       "wms_enable_request" "GetMap GetCapabilities GetLegendGraphic"
       "wms_title" "Shaded Relief Land - Gray - Alaska Main"
       "wms_srs" "CRS:84 EPSG:4326 EPSG:2163 EPSG:102100 EPSG:4269 
EPSG:4267 EPSG:54004 EPSG:54008 EPSG:3785 EPSG:3857 EPSG:102113 EPSG:900913"
     END
   END

   IMAGETYPE     png
   EXTENT        -179.9985999 49.8276632 -126.9992066 71.9547724
   UNITS         METERS
   IMAGECOLOR    255 255 254
   SIZE          256 256
   SHAPEPATH     "/home/public_html/map_server/data/raster/"
   FONTSET       "/home/public_html/map_server/fonts/fonts.list"
   SYMBOLSET     "/home/public_html/map_server/symbols.sym"

   PROJECTION
     "init=epsg:4326"
   END

   LEGEND
     STATUS ON
     IMAGECOLOR 255 255 255
   END
   NAME          srgy_6arcsec_akmain

  LAYER
     NAME     srgy_6arcsec_akmain
     DATA     alaska_geo_wgs84_6arcsec_cc_sr_gray_main.tif
     STATUS   OFF
     TYPE    RASTER
     OFFSITE 0 0 0
     METADATA
       "wms_title"  "Shaded Relief Land - Gray - Alaska Main"
     END
   END #end the layer


  END #end of map
========
Here is the WMS service capabilities map file.
========
MAP
   OUTPUTFORMAT
     NAME          "png"
     DRIVER        AGG/PNG
     MIMETYPE      "image/png"
     IMAGEMODE     RGBA
     EXTENSION     "png"
     TRANSPARENT   ON
   END

   OUTPUTFORMAT
     NAME          "jpeg"
     DRIVER        AGG/JPEG
     MIMETYPE      "image/jpeg"
     IMAGEMODE     RGB
     EXTENSION     "jpg"
     FORMATOPTION  "GAMMA=0.75"
   END

   WEB
     METADATA
       "wms_onlineresource" "http://<internal_ip_address>/wms/raster?"
       "wms_enable_request" "GetMap GetCapabilities GetLegendGraphic"
       "wms_title" "New Projected Raster Data"
       "wms_srs" "CRS:84 EPSG:4326 EPSG:2163 EPSG:102100 EPSG:4269 
EPSG:4267 EPSG:54004 EPSG:54008 EPSG:3785 EPSG:3857 EPSG:102113 EPSG:900913"
     END
   END

   IMAGETYPE     png
   EXTENT        -179.9985999 49.8276632 -126.9992066 71.9547724
   UNITS         METERS
   IMAGECOLOR    255 255 254
   SIZE          256 256
   SHAPEPATH     "/home/public_html/map_server/data/raster/"
   FONTSET       "/home/public_html/map_server/fonts/fonts.list"
   SYMBOLSET     "/home/public_html/map_server/symbols.sym"

   PROJECTION
    "init=epsg:4326"
   END

   LEGEND
     STATUS ON
     IMAGECOLOR 255 255 255
   END
   NAME          raster_test

  LAYER
     NAME     srgy_6arcsec_akmain
     DATA     alaska_geo_wgs84_6arcsec_cc_sr_gray_main.tif
     STATUS   OFF
     TYPE    RASTER
     OFFSITE 0 0 0
     METADATA
       "wms_title"  "Shaded Relief Land - Gray - Alaska Main"
     END
   END #end the layer


  END #end of map
======

Any help is greatly appreciated.

Thanks!
-Jennifer Martin





More information about the MapServer-users mailing list