WMS re-projection

Ryan Ollerenshaw ollerery at ENGR.ORST.EDU
Tue Jul 25 10:49:25 EDT 2006


When i change the projection in my map file to "proj=sinu" the image that is
returned is blurred (reprojected incorrectly).
But when i do the reprojection using PHP/MapScript the images gets reprojected
just fine.  Does anyone know why the reprojection would work work in
PHP/Mapscript but not when entered into the mapfile directly?


PHP Code, that works:
$map3->setProjection("+proj=sinu",MS_TRUE);
$map3->setExtent(-350878.81, -9890271.86, 350878.81, 9890271.86);
$image3=$map3->draw();


Here is my mapfile:

NAME WMS_WFS_WCS_server
STATUS ON
SIZE 1000 600
#EXTENT 0 -90 360 90
EXTENT -180 -90 180 90
#EXTENT -350878.81 -9890271.86 350878.81 9890271.86
SHAPEPATH "../data/"
IMAGECOLOR 255 255 255

WEB
  TEMPLATE test_template.html
  IMAGEPATH "/tmp/ms_tmp/"
  IMAGEURL "/ms_tmp/"
  METADATA
    wcs_NAME  "MapServer Web Services"
    wfs_title "WFS MapServer"
    wcs_ACCESSCONSTRAINTS "NONE"
    wcs_ONLINERESOURCE "http://neuron/cgi-bin/mapserv?map=webservices.map&"
    WCS_SRS     "EPSG:4326"
    WCS_FEES "NONE"
    wcs_label 'Data Sets'
  END
END

PROJECTION
  "init=epsg:4326"
#  "proj=sinu"
END

#GTiff will not display but a PNG will
OUTPUTFORMAT
    NAME PNG
    DRIVER "GDAL/PNG"
    MIMETYPE "image/png"
    #IMAGEMODE "RGBA"
    IMAGEMODE "PC256"
    EXTENSION "png"
    FORMATOPTION "COMPRESS=PACKBITS"
END

LAYER
  NAME "themis"
  STATUS ON
  TILEINDEX "thm_img.shp"
  TILEITEM "location"
  PROJECTION
    "init=epsg:4326"
  END
  TYPE RASTER
  DUMP TRUE
  METADATA
    wms_name "THEMIS_Data"
    wms_description "THEMIS dataset"
    wms_label "THEMIS dataset"
    wms_srs "EPSG:4326"
    ows_extent "-180 -90 180 90"
    #ows_extent "-350878.81 -9890271.86 350878.81 9890271.86"
    wcs_resolution "150 150"
    wcs_size "2700 3197"
    wcs_formats "GEOTIFF"
    wcs_rangeset_label 'THEMIS Data sets'
    wcs_rangeset_name 'THEMIS Data'
  END
END



More information about the mapserver-users mailing list