problematic map file

Arnulf Christl arnulf.christl at CCGIS.DE
Tue Aug 17 04:02:01 EDT 2004


Oliver Ishmael wrote:

> Hi All,
>
> I have been trying to display a map of the world using the attached .MAP
> file (also displayed below), however, this has met with limited success.
>
> All that i have managed to display is the .HTML template,
> unfortunately no
> image is displayed and no error messages are displayed.
>
Are you sure that no image is returned, or is the image just blank (white)?
...
# for some reason this projection is usually dif from the layer
projection...why?!

It works this way: In the MAP section you decide in which srs you want
to have a look at the maps. In each LAYER sections you tell MapServer in
which srs the data is coded. So you should first find out which srs your
Africa geometry was originally coded in and refereence that in the LAYER
section. Then you can use the same for the MAP section. At last you
retreive the EXTENT of you data. Be careful to put the right values
here, else MapServer will simply "look" at the wrong place to start with
and correctly return a map image - but with nothing to be seen

Cheers, Arnulf.

> It might be a lot to ask but if you can see anything i've missed i would
> really appreciate any help you can provide.
>
> Cheers
> Oliver Ishmael
>
> MAP
> NAME            world_tm
> IMAGETYPE    PNG
> EXTENT         148.3 198.0 198.0 120.7
> SIZE              600 400
> SHAPEPATH   "mapserver/data/"
> # Index of
> colours...http://webmonkey.wired.com/webmonkey/reference/color_codes/
> IMAGECOLOR  95 158 180
>
> WEB
>  TEMPLATE 'world_tm.html'
>  IMAGEPATH '../mapserver/data/tmp/'
>  IMAGEURL '../mapserver/data/tmp/'
> END
>
> PROJECTION
>  # this code can be found in the "epsg.file" (when opened in txt ed. it
> lists every projection
>  # and their respective epsg codes)
>  "init=epsg:2156"
>  # for some reason this projection is usually dif from the layer
> projection...why?!
> END
>
> SCALEBAR
> IMAGECOLOR 255 255 255
> LABEL
>   COLOR 0 0 0
>   SIZE TINY
> END
> STYLE 1
> SIZE 200 2
> COLOR 0 0 0
> UNITS MILES
> INTERVALS 2
> TRANSPARENT FALSE
> STATUS ON
> END
>
>
> # Start of LAYER DEFINITIONS
> ---------------------------------------------
>
> LAYER # African continent polygon layer begins here
>  NAME Africa
>  DATA Africa
>  STATUS OFF
>  TYPE POLYGON
>
>  PROJECTION
> # this is the exact code for Egypt using UTM (just picked a country in
> Africa at random!)
> "init=epsg:4198"
>  END
>
>  CLASS
> COLOR 255 255 0
> OUTLINECOLOR 255 255 0
>  END
>
> END # African continent polygon layer ends here
>
>
>
> LAYER # Asian continent polygon layer begins here
>  NAME Asia
>  DATA Asia
>  STATUS OFF
>  TYPE POLYGON
>
>  PROJECTION
> # this is the exact code for India (just picked a country in Asia at
> random!)
> "init=epsg:4238"
>  END
>
>  CLASS
> COLOR 178 34 34
> OUTLINECOLOR 255 255 0
>  END
>
> END # Asian continent polygon layer ends here
>
> LAYER # Australasian continent polygon layer begins here
>  NAME Australasia
>  DATA Australasia
>  STATUS OFF
>  TYPE POLYGON
>
>  PROJECTION
> # this is the exact code for Australia (just picked a country in
> Australasia
> at random!)
> "init=epsg:4002"
>  END
>
>  CLASS
> COLOR 178 34 34
> OUTLINECOLOR 255 255 0
>  END
>
> END # Australian continent polygon layer ends here
>
> LAYER # European continent polygon layer begins here
>  NAME Europe
>  DATA Europe
>  STATUS OFF
>  TYPE POLYGON
>
>  PROJECTION
> # this is the exact code for Ireland using UTM (just picked a country in
> Europe at random!)
> "init=epsg:2156"
>  END
>
>  CLASS
> COLOR 178 34 34
> OUTLINECOLOR 255 255 0
>  END
>
> END # European continent polygon layer ends here
>
> LAYER # North American continent polygon layer begins here
>  NAME NorthA
>  DATA NorthA
>  STATUS DEFAULT
>  TYPE POLYGON
>
>  PROJECTION
> # this is the exact code for Illinois (just picked a state in North
> America
> at random!)
> "init=epsg:26770"
>  END
>
>  CLASS
> COLOR 178 34 34
> OUTLINECOLOR 255 255 0
>  END
>
> END # North American continent polygon layer ends here
>
> LAYER # South American continent polygon layer begins here
>  NAME SouthA
>  DATA SouthA
>  STATUS OFF
>  TYPE POLYGON
>
>  PROJECTION
> # this is the exact code for Brazil (just picked a country in South
> America
> at random!)
> "init=epsg:28992"
>  END
>
>  CLASS
> COLOR 178 34 34
> OUTLINECOLOR 255 255 0
>  END
>
> END # South American continent polygon layer ends here
>
>
>
>
> # End of LAYER DEFINITIONS ---------------------------------------------
>
> END # end of map file/object
>
> _________________________________________________________________
> Use MSN Messenger to send music and pics to your friends
> http://www.msn.co.uk/messenger
>
>------------------------------------------------------------------------
>
>
>
>
>      World Travel Map
>
>Select Layers:
>Africa  Asia  Australasia  Europe
>NorthA  SouthA
>
>Map Mode:
>
>Map Control:
>
>
>
>
> ------------------------------------------------------------------------
>
> MAP
>  NAME          world_tm
>  IMAGETYPE     PNG
>  STATUS        ON
>  UNITS         MILES
>  EXTENT        148.3 198.0 198.0 120.7
>  SIZE          600 400
>  SHAPEPATH     "/localhost/mapserver/data"
>  # Index of
> colours...http://webmonkey.wired.com/webmonkey/reference/color_codes/
>  IMAGECOLOR    120 158 13
>
>  WEB
>     TEMPLATE   'world_tm.html'
>     IMAGEPATH  '../mapserver/data/tmp/'
>     IMAGEURL   '../mapserver/data/tmp/'
>  END
>
>  PROJECTION
>     # this code can be found in the "epsg.file" (when opened in txt
> ed. it
> lists every projection
>     # and their respective epsg codes)
>     "init=epsg:2156"
>     # for some reason this projection is usually dif from the layer
> projection...why?!
>  END
>
>  SCALEBAR
>    IMAGECOLOR 255 255 255
>    LABEL
>      COLOR 0 0 0
>      SIZE TINY
>    END
>    STYLE 1
>    SIZE 200 2
>    COLOR 0 0 0
>    UNITS MILES
>    INTERVALS 2
>    TRANSPARENT FALSE
>    STATUS ON
>  END
>
>
>  # Start of LAYER DEFINITIONS
> ---------------------------------------------
>
>  LAYER # African continent polygon layer begins here
>     NAME       Africa
>     DATA       Africa
>     STATUS     ON
>     TYPE       POLYGON
>
>     PROJECTION
>        # this is the exact code for Egypt using UTM (just picked a
> country in
> Africa at random!)
>        "init=epsg:4198"
>     END
>
>     CLASS
>        COLOR           255 255 0
>        OUTLINECOLOR    255 255 0
>     END
>
>  END # African continent polygon layer ends here
>
>
>
>  LAYER # Asian continent polygon layer begins here
>     NAME       Asia
>     DATA       Asia
>     STATUS     ON
>     TYPE       POLYGON
>
>     PROJECTION
>        # this is the exact code for India (just picked a country in
> Asia at
> random!)
>        "init=epsg:4238"
>     END
>
>     CLASS
>        COLOR           178 34 34
>        OUTLINECOLOR    255 255 0
>     END
>
>  END # Asian continent polygon layer ends here
>
>  LAYER # Australasian continent polygon layer begins here
>     NAME       Australasia
>     DATA       Australasia
>     STATUS     ON
>     TYPE       POLYGON
>
>     PROJECTION
>        # this is the exact code for Australia (just picked a country in
> Australasia at random!)
>        "init=epsg:4002"
>     END
>
>     CLASS
>        COLOR           178 34 34
>        OUTLINECOLOR    255 255 0
>     END
>
>  END # Australian continent polygon layer ends here
>
>  LAYER # European continent polygon layer begins here
>     NAME       Europe
>     DATA       Europe
>     STATUS     ON
>     TYPE       POLYGON
>
>     PROJECTION
>        # this is the exact code for Ireland using UTM (just picked a
> country in
> Europe at random!)
>        "init=epsg:2156"
>     END
>
>     CLASS
>        COLOR           178 34 34
>        OUTLINECOLOR    255 255 0
>     END
>
>  END # European continent polygon layer ends here
>
>  LAYER # North American continent polygon layer begins here
>     NAME       NorthA
>     DATA       NorthA
>     STATUS     ON
>     TYPE       POLYGON
>
>     PROJECTION
>        # this is the exact code for Illinois (just picked a state in
> North America
> at random!)
>        "init=epsg:26770"
>     END
>
>     CLASS
>        COLOR           178 34 34
>        OUTLINECOLOR    255 255 0
>     END
>
>  END # North American continent polygon layer ends here
>
>  LAYER # South American continent polygon layer begins here
>     NAME       SouthA
>     DATA       SouthA
>     STATUS     ON
>     TYPE       POLYGON
>
>     PROJECTION
>        # this is the exact code for Brazil (just picked a country in
> South America
> at random!)
>        "init=epsg:28992"
>     END
>
>     CLASS
>        COLOR           178 34 34
>        OUTLINECOLOR    255 255 0
>     END
>
>  END # South American continent polygon layer ends here
>
>
>
>
>  # End of LAYER DEFINITIONS ---------------------------------------------
>
> END # end of map file/object
>


--
----------------------------
CCGIS Christl & Stamm GbR
----------------------------
http://www.ccgis.de
http://www.mapbender.org
----------------------------
Service: +49 (0)228 90826 0
Direct:  +49 (0)228 90826 23
Fax:     +49 (0)228 90826 11
----------------------------
CCGIS Christl & Stamm GbR
Siemensstraße 8
53121 Bonn
GERMANY



More information about the mapserver-users mailing list