how I can configure mapfile to display my district.shp

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how I can configure mapfile to display my district.shp

AMBELE MWAFULA


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
[hidden email]
http://lists.maptools.org/mailman/listinfo/chameleon-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how I can configure mapfile to display my district.shp

Julien-Samuel Lacroix-2
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
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/chameleon-dev
>

--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Chameleon-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/chameleon-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how I can configure mapfile to display

Julien-Samuel Lacroix-2

Hi,

Chameleon and MapServer (The base mapping engine behind Chameleon)
accept all the projections supported by Proj4 (Mostly all EPSG code and
more).

The data used in the Chameleon sample where you see a map of Canada is
projected with a canadian projection that's all.

To learn more about projection you can read documentation here:
http://mapserver.gis.umn.edu/docs/reference/mapfile/projection

Julien

AMBELE MWAFULA wrote:

>hi
>
> thanks for responding.I have tried to find the projection type without
> success.SO DOES CHAMELEON ACCEPTS ONLY CANADA STANDARDS?I ask this so that
> I can opt to use another softwares to develop webGIS based system.Suggest
> what i have do after this failure.My maps are  produced from ArcViewGIS
> Software.May this be a reason?
>
> Mr Ambele Mwafula
> Student,University of Dar es Salaam, Tanzania
>
>
>

--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Chameleon-dev mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/chameleon-dev
Loading...