[mapserver-users] Re: Fwd: Best and simplest solution for setting up a raster map server

Ibrahim Saricicek ibrahimsaricicek at gmail.com
Mon Apr 12 04:02:11 PDT 2010


Hi,

Have you geo-referenced (registered) your rasters.
If so try mapserver+openlayers.

This explains how you add your raster layers.
http://mapserver.org/input/raster.html 

And this is an example of mapserver and openlayers.
http://openlayers.org/dev/examples/mapserver.html

Your map file will be like this..

MAP

NAME MAPFILE
STATUS ON
SIZE 800 600
SYMBOLSET ../etc/symbols.sym
FONTSET ../etc/fonts.txt
EXTENT -20037508 -20037508 20037508 20037508.34
UNITS METERS
SHAPEPATH "../data"
IMAGECOLOR 255 255 255
DEBUG 4
MAXSIZE 3000 

OUTPUTFORMAT
  NAME PNG
  DRIVER "GD/PNG"
  MIMETYPE "image/PNG"
  IMAGEMODE RGB
  EXTENSION "PNG"
  TRANSPARENT ON
  FORMATOPTION "INTERLACE=OFF"
  FORMATOPTION "QUANTIZE_COLORS=256"
  FORMATOPTION "QUANTIZE_FORCE=ON"
END 

  IMAGEPATH "/ms4w/tmp/ms_tmp/" 
  IMAGEURL "/ms_tmp/"
  METADATA
    "wms_title"   "World"
    "wms_onlineresource"
"http://127.0.0.1/cgi-bin/world.exe?MAP=/ms4w/apps/gmap/htdocs/world_900913.map"
    "wms_srs"   "EPSG:4326 EPSG:900913" #always capital letters
    'wms_feature_info_mime_type' 'text/html'
    'wms_encoding' 'UTF-8'
  END
END

PROJECTION
  "init=epsg:900913"
END


LAYER
NAME 'Raster'
DATA "C:\myraster.tif"
TYPE RASTER
  PROJECTION
    "init=epsg:4326"
  END
STATUS ON
END #Layer

END # Map File
-- 
View this message in context: http://n2.nabble.com/Fwd-Best-and-simplest-solution-for-setting-up-a-raster-map-server-tp4886892p4889407.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the MapServer-users mailing list