[beginner] Why does it look like a map of Arctic Snowfields?
Matt Krusemark
mkrusmar at clayey.soils.umn.edu
Wed Sep 15 13:41:38 PDT 1999
Jason, Hello, I am also new to mapserver (one week, approximately). I
also had the snow problem. However, from my experience, it is definately
best to start out with one layer at a time and then add on (Thanks for
your advice Paul :) - plug for my office-mate)
There is a stand-alone command that is called 'shp2gif' that is like a
de-bugging command. It can be found in the ms_3.2 directory after
installation.
The syntax looks like this: shp2gif -m state.map -o state.gif
Running this on your mapfile will make a gif image of either
snow or your first layer :) - hopefully your first layer. If it does not
run completely, it will give you an error message of what is not working
so you can start to debug. I kept my file very simple, not quite as
complex as the demo (hey - it was complex for me anyhoo) and am going to
then be adding layers to it.
I wanted to make sure to get at least one layer working first.
Just a suggestion from someone who made the suggestion to me-
-matt
Here is my map file:
#
# Start of map file
#
NAME STATE
STATUS ON
SIZE 600 600
SHADESET /usr/people/mkrusmar/mapserv/ms_demo/ms_demo/symbols/shade.sym
MARKERSET /usr/people/mkrusmar/mapserv/ms_demo/ms_demo/symbols/marker.sym
LINESET /usr/people/mkrusmar/mapserv/ms_demo/ms_demo/symbols/line.sym
EXTENT 189783 4816309 761653 5472346
UNITS METERS
SHAPEPATH "/usr/people/mkrusmar/mapserv/shp"
IMAGECOLOR 255 255 255
LABELOVERLAP FALSE
#
# Start of web interface definition
#
WEB
HEADER /usr/people/mkrusmar/mapserv/web/state_header.html
TEMPLATE /usr/people/mkrusmar/mapserv/web/state.html
MINSCALE 1000
MAXSCALE 100000000
END
#########################
# Start of reference map#
#########################
REFERENCE
IMAGE /usr/people/mkrusmar/mapserv/graphics/reference_state.gif
EXTENT 189783 4816309 761653 547234
STATUS ON
COLOR -1 -1 -1
OUTLINECOLOR 255 0 0
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 350 5
COLOR 255 255 255
BACKGROUNDCOLOR 0 0 0
OUTLINECOLOR 0 0 0
UNITS MILES
INTERVALS 5
STATUS ON
END
#
# Start of layer definitions
#
LAYER
NAME county
TYPE POLYGON
STATUS DEFAULT
DATA /usr/people/mkrusmar/mapserv/shp/county
# TOLERANCE 3
CLASS
NAME "County"
SYMBOL 0
OUTLINECOLOR 0 0 0
COLOR 248 248 95
END
QUERYITEM "Name"
QUERY
TEMPLATE /usr/people/mkrusmar/mapserv/web/county_query.html
END
END
END
END # Map File
On Wed, 15 Sep 1999, Jason Domina wrote:
> howdy,
>
> Normally I am loathe to issue a cry for help on matters that are trivial to
> those who have RTFM :) However, time has squeezed me into a corner that I
> cannot wriggle out of. I am not an GIS analyst, so much of this is still very
> confusing. I am a web developer working for a local county government in
> Billings, MT USA. We've been using ESRI's MapObjects and Internet Map Server
> to develop a web based interface to the county's GIS information on Windows
> NT(IIS4). The tirade of expletives this software combination has caused me to
> expell isn't worth repeating, but needless to say, these products have
> occasioned me to explore alternatives. A quick search on Freshmeat.net brought
> me to MapServer and having viewed the speed and stability of the demo site, I
> quickly became enamored.
>
> I can get the demo setup and running correctly on my test machine which is
> currently running Caldera OpenLinux 2.3 and Apache 1.3.9. However, when I try
> to use some of our shapefiles I get nothing but an Arctic Snowfield. My map is
> just a big, ol' white square. I hope it is not too crass, but below you will
> find a copy of my ystone.map file. What am I doing wrong?
>
> Thank you,
> Jason Domina
> Yellowstone County IS Internet Specialist
>
>
>
> -------------begin ystone.map----------------------------
>
> #
> # Start of map file
> #
> NAME ystone
> STATUS ON
> SIZE 600 600
> SHADESET symbols/shade.sym
> MARKERSET symbols/marker.sym
> LINESET symbols/line.sym
> EXTENT 2106685.23181818 443164.375 2492152.01818182 823786.875
> UNITS FEET
> SHAPEPATH /home/httpd/html/mapdev/data
> IMAGECOLOR 255 255 255
>
> LABELOVERLAP FALSE
>
> #
> # Start of web interface definition
> #
> WEB
> HEADER demo_header.html
> TEMPLATE demo.html
> MINSCALE 1000
> MAXSCALE 1550000
> END
>
> #
> # Start of reference map
> #
> REFERENCE
> IMAGE graphics/reference_base.gif
> EXTENT 2106685.23181818 443164.375 2492152.01818182 823786.875
> STATUS ON
> COLOR -1 -1 -1
> OUTLINECOLOR 255 0 0
> 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 350 5
> COLOR 255 255 255
> BACKGROUNDCOLOR 0 0 0
> OUTLINECOLOR 0 0 0
> UNITS MILES
> INTERVALS 5
> STATUS ON
> END
>
> #
> # Start of layer definitions
> #
>
> LAYER
> NAME Sections
> TYPE POLYGON
> STATUS ON
> DATA /home/httpd/html/mapdev/data/sections
> CLASS
> SYMBOL 0
> OUTLINECOLOR 0 0 0
> COLOR 248 248 95
> END
> END # Layer
>
> LAYER
> NAME Townships
> TYPE POLYGON
> STATUS ON
> DATA /home/httpd/html/mapdev/data/towna
> CLASS
> SYMBOL 0
> OUTLINECOLOR 0 0 102
> COLOR 255 255 240
> END
> END # Layer
>
> LAYER
> NAME primary_roads
> TYPE LINE
> STATUS ON
> DATA /home/httpd/html/mapdev/data/Y_ROADS
> SYMBOLSCALE 24000
>
> CLASS
> NAME "Roads"
> COLOR 128 128 128
> SYMBOL 13
> SIZE 3
> MAXSIZE 5
> END
> END # Layer
>
> END # Map File
>
--------------------------------------------
Matthew G. Krusemark
Information Technology / GIS
Dept. of Soil, Water & Climate
University of Minnesota
439 Borlaug Hall
St. Paul, MN 55108-6028
email. mkrusmar at gis.umn.edu
tel. 612-625-9737
http://soils.umn.edu/slal
--------------------------------------------
More information about the MapServer-users
mailing list