First-time user needs help with mapfile
Keerati Inochanon
unselfishly at GMAIL.COM
Wed Jan 19 19:46:40 PST 2005
Hi Jacob,
I tried what you suggested, and it worked. Thank you very much. I
really appreciate your help. I was also wondering whether you know of
any good online tutorials I could go through (other than the ones
listed on the website).
Thank you!
Keerati
On Thu, 20 Jan 2005 11:24:37 +0800, Jacob Delfos
<jacob.delfos at maunsell.com> wrote:
>
> Keerati,
>
> A few things I spotted (which may not necessarily be all problems) :
>
> - Your mapfile should have an output format:
>
> OUTPUTFORMAT
> NAME png
> DRIVER "GD/PNG"
> MIMETYPE "image/png"
> IMAGEMODE PC256
> EXTENSION "png"
> END
>
> If you don't have it, it may still work, but it will use the default format.
>
> - Your layer must have a class. This defines what it looks like. Without it,
> it will definitely not show anything:
>
> CLASS
> NAME "countries" # this must be there to show it in the legend
> COLOR 255 255 180 # the fill colour
> OUTLINECOLOR 0 0 0 # the boundary colour
> END
>
> - last thing: better not put spaces in your filenames. It may work, but I
> could well imagine if it didn't.
>
> Try these and see what happens.
>
> regards,
>
> Jacob
>
>
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Keerati Inochanon
> Sent: 20 January 2005 11:06
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] First-time user needs help with mapfile
>
>
> Hi,
> I'm new at GIS and mapserver, and just decided to try it out. I was
> wondering if someone could guide me into the right direction. I
> downloaded world base map shapefiles from esri website. I wrote a
> mapfile for it, and tried to have mapscript render it, but it does not
> work (image produced, but only background). Here is what my map file
> looks like:
>
> MAP
> NAME ASIA
> STATUS ON
> SIZE 800 500
> IMAGETYPE PNG
> IMAGECOLOR 240 240 240
> SHAPEPATH "C:\\Program Files\\Apache
> Group\\Apache2\\htdocs\\mapserver\\testshp"
> EXTENT 90.0168 0.6079 113.5783 24.1694
> UNITS DD
> PROJECTION
> "proj=latlong"
> "ellps=GRS80"
> "datum=NAD83"
> END
> LAYER
> NAME "boundaries"
> TYPE POLYGON
> STATUS ON
> DATA "Country Boundaries 3"
> PROJECTION
> "proj=latlong"
> "ellps=GRS80"
> "datum=NAD83"
> END
> END
> END
>
> I got the extent info from the download page of the dataset
>
> These are the files in the testshp directory:
> B_Major Cities 1.dbf
> B_Major Cities 1.prj
> B_Major Cities 1.shp
> B_Major Cities 1.shx
> Country Boundaries 3.dbf
> Country Boundaries 3.prj
> Country Boundaries 3.shp
> Country Boundaries 3.shx
> Rivers 2.dbf
> Rivers 2.prj
> Rivers 2.shp
> Rivers 2.shx
> Streets and Railroads 1.dbf
> Streets and Railroads 1.prj
> Streets and Railroads 1.shp
> Streets and Railroads 1.shx
> Water Bodies 2.dbf
> Water Bodies 2.prj
> Water Bodies 2.shp
> Water Bodies 2.shx
>
> Any help or suggestions will be much appreciated. Thank you very much!
>
> Keerati
>
>
>
>
More information about the MapServer-users
mailing list