[Chameleon-dev] how I can configure mapfile to display my district.shp

Julien-Samuel Lacroix jlacroix at mapgears.com
Fri Feb 22 12:06:04 EST 2008


Hi,

You may get more help on mapfile configuration on the mapserver 
mailing-list.
http://mapserver.gis.umn.edu/community/mailinglists/mapserver-users

Anyway, Your district layer is probably configured with the wrong 
projection. In your layer is configured with the
PROJECTION
     "init=epsg:42304"
END

The 42304 projection is specific to Canada data. Seeing that you are in 
Tanzania, that's probably not what you want. You can use ogrinfo to try 
to determine your projection.
http://www.gdal.org/ogr/ogrinfo.html

Julien

AMBELE MWAFULA wrote:
> 
> Hi,
> I have three files name district.shp,district.shx and district.dbf placed
> in data directory.I have tried to configure mapfile so that the map can be
> displayed unsuccessfully.See how I have configured mapfile
> 
> #
> # Start of map file
> #
> # Sample map file for a chameleon app.
> #
> NAME DEMO
> STATUS ON
> SIZE 400 300
> SYMBOLSET ../etc/symbols.sym
> EXTENT -2594561 -712631 3467361 3840000
> UNITS METERS
> SHAPEPATH "../data"
> IMAGECOLOR 255 255 255
> FONTSET ../etc/fonts.txt
> TRANSPARENT FALSE
> #
> # Start of web interface definition
> #
> WEB
>   #MINSCALE 2000000
>   #MAXSCALE 50000000
> #
> # On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root
> # of the drive where the .MAP file resides.
> #
>   IMAGEPATH "/ms4w/tmp/ms_tmp/"
>   IMAGEURL "/ms_tmp/"
> #  LOG "/tmp/gmap.log"
>   METADATA
>   END
> END
> #
> # Start of reference map
> #
> REFERENCE
>    IMAGE images/keymap.gif
>    EXTENT -2594561 -712631 3467361 3840000
>    STATUS ON
>   COLOR -1 -1 -1
>   OUTLINECOLOR 255 0 0
>   SIZE 120 90
> END
> #
> # Start of legend
> #
> LEGEND
>   KEYSIZE 18 12
>   LABEL
>     TYPE BITMAP
>     SIZE MEDIUM
>     COLOR 0 0 89
>   END
>   STATUS ON
> END
> #
> # Start of scalebar
> #
> SCALEBAR
>   IMAGECOLOR 255 255 255
>   LABEL
>     COLOR 0 0 0
>     SIZE SMALL
>   END
>   SIZE 150 5
>   COLOR 255 255 255
>   BACKGROUNDCOLOR 0 0 0
>   OUTLINECOLOR 0 0 0
>   UNITS kilometers
>   INTERVALS 5
>   STATUS ON
> END
> QUERYMAP
>   STYLE HILITE
>   COLOR 255 0 0
> END
> 
> PROJECTION
>     "init=epsg:42304"
> END
> #
> # Start of layer definitions
> #
> 
> LAYER
>   GROUP "Polygon"
>   NAME district
>   METADATA
>     "DESCRIPTION" "district"
>     "GROUP" "Polygon"
>     "LAYER" "district"
>   END
>   TYPE POLYGON
>   STATUS ON
>   DATA district
>   CLASS
>     NAME "district"
>     COLOR 240 240 240
>     OUTLINECOLOR 199 199 199
>   END
> PROJECTION
>     "init=epsg:42304"
> END
> END # layer
> 
> 
> END # Map File
> 
> So help me what am I supposed to change so that the map could be displayed
> Mr Ambele Mwafula
> Student,University of Dar es Salaam,
> Tanzania
> 
> 
> 
> 
> _______________________________________________
> Chameleon-dev mailing list
> Chameleon-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon-dev
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Chameleon-dev mailing list