[mapserver-users] New to Mapserver
Sathiskumar Govindasamy
gsathis at yahoo.com
Mon Feb 11 09:14:20 PST 2002
Steve, Thanks for your help. I have downloaded shapefiles from
http://www.census.gov/geo/www/cob/st2000.html which are state boundary
shape files. I tried to tweek the demo to work with that data. But I
don't see anything on the maparea. The shape files are like st01_d00.xxx
. There are three files per state. The following are my files.
demo_init.html
> Sathis,<html>
> <head><title>MapServer Demo Interface</title></head>
> <body bgcolor="#FFFFFF">
>
> <center><h2>MapServer Demo Interface</h2></center>
> <p><hr><p>
> Click on the initialize button to fire up the demo with 3 layers
> turned on will be accessible for browsing. The
> data are of Itasca County, MN and were derived, for the most part,
> from USGS 1:24,000 quadrangles. Some things to note are:
>
> <form method=GET action="/cgi-bin/mapserv">
>
> <input type="hidden" name="map" value="/var/www/html/tigertest/demo.map">
> <input type="hidden" name="layer" value="Polygon">
> <input type="hidden" name="zoomsize" value=2>
>
> <input type="hidden" name="program" value="/cgi-bin/mapserv">
> <input type="hidden" name="map_web_imagepath" value="/var/www/html/tmp/">
> <input type="hidden" name="map_web_imageurl" value="/tmp/">
>
> <center><input type="submit" value="Initialize"></center>
>
> </form>
>
> <p><hr><p>
>
> </body></html>
> ~
demo.html
<html>
<head><title>MapServer Demo Interface</title></head>
<body bgcolor=#FFFFFF>
<center><h1>MapServer Demo Interface</h1></center>
<hr>
<form method=GET action="[program]">
<center>
<table border=0 cellspacing=0 cellpadding=4 bgcolor="#000000">
<tr>
<td valign="top" align=center>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td colspan="2"><INPUT NAME="img" TYPE="image" SRC="[img]"
width=600 height=600 border=0></td></tr>
<tr>
<td> <font size=-1 face="arial,helvetica"
color="#FFFFFF"><b>Powered by MapServer</b></font></td>
<td align="right"><img src="[scalebar]"></td>
</tr>
</table>
</td>
<td valign="top" bgcolor=#ffffff>
<table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff">
<tr><td>
Zoom In <input type=radio name=zoomdir value=1 [zoomdir_1_check]>
Pan <input type=radio name=zoomdir value=0 [zoomdir_0_check]>
Zoom Out <input type=radio name=zoomdir value=-1 [zoomdir_-1_check]>
<p>
Zoom Size <input type=text name=zoomsize size=4 value=[zoomsize]>
<p>
</td></tr></table>
</td></tr>
</table>
</center>
<input type="hidden" name="imgxy" value="299.5 299.5">
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="map" value="[map]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="program" value="[program]">
<input type="hidden" name="map_web_imagepath" value="[map_web_imagepath]">
<input type="hidden" name="map_web_imageurl" value="[map_web_imageurl]">
</form>
<p><hr><p>
</body></html>
demo.map
NAME EX2
EXTENT 74000 4775000 798000 5500000
SIZE 300 300
SHAPEPATH "tigershpdata"
WEB
HEADER demo_header.html
TEMPLATE demo.html
FOOTER demo_footer.html
MINSCALE 1000
MAXSCALE 1550000
IMAGEPATH "set in demo_init.html"
IMAGEURL "set in demo_init.html"
END
#
# Start of scalebar
#
SCALEBAR
IMAGECOLOR 255 255 255
LABEL
COLOR 255 255 255
SIZE tiny
END
STYLE 1
SIZE 80 2
COLOR 255 255 255
UNITS MILES
INTERVALS 1
TRANSPARENT TRUE
STATUS TRUE
END
#
# Start of layer definitions
#
LAYER
NAME st01_d00
TYPE POLYGON
STATUS DEFAULT
DATA st01_d00
CLASS # every other county in the state
EXPRESSION /./
OUTLINECOLOR 128 128 128
COLOR 49 117 185
END
END
END
Can some tell me what the problem may be ?
>
>
>
>If you expect to get more than a few token hits on your server for
>demonstration purposes, you need to seriously consider translating the
>tigerline data to shape files as you will have big performance problems
>otherwise. If you ever plan to expand your data beyond one state you
>will need to use shapefiles also. The Census offers a bunch of boundary
>shapefiles now on its website for download, I don't think they have the
>street level files. Here are two layer definitions I use in my map file
>that might help, but I use shapefiles not OGR:
>
>LAYER
> NAME county
> MAXSCALE 799999
> TYPE POLYGON
> STATUS ON
> TILEINDEX "tgrindex"
> DATA county
> CLASS
> NAME "Counties"
> COLOR -1 -1 -1
> OUTLINECOLOR 128 128 128
> END
>
> METADATA
> "DESCRIPTION" "County"
> "RESULT_FIELDS" "COUNTY STATE SSCCC"
> END
>
> HEADER "html/cty_header.html"
> FOOTER "html/cty_footer.html"
> TEMPLATE "html/cty.html"
>
> TOLERANCE 3
>END
>
>LAYER
> NAME streets
> MAXSCALE 59999
> STATUS ON
> TILEINDEX "tgrindex"
> DATA minroads
> TYPE LINE
> LABELITEM "NAME"
> CLASS
> NAME "Streets"
> SYMBOL "circle"
> COLOR 0 0 0
> SIZE 4
> OVERLAYSYMBOL "circle"
> OVERLAYCOLOR 255 255 255
> OVERLAYSIZE 2
> LABEL
> ANGLE AUTO
> TYPE TRUETYPE
> ANTIALIAS TRUE
> FONT arial-bold
> MINFEATURESIZE 10
> MINDISTANCE 300
> POSITION UC
> BUFFER 4
> SIZE 8
> COLOR 0 0 0
> OUTLINECOLOR 255 255 204
> END
> END
>
> METADATA
> "DESCRIPTION" "Surface Streets"
> "RESULT_FIELDS" "TLID NAME CFCC FRADDL TOADDL FRADDR TOADDR ZIPL
>ZIPR RTE_NUM"
> END
>
> HEADER "html/roads_header.html"
> FOOTER "html/roads_footer.html"
> TEMPLATE "html/roads.html"
>
> TOLERANCE 3
>END # streets
>
>
>-Steve
>
>Sathiskumar Govindasamy wrote:
>
>>Hi,
>>
>>Thanks for your reply. Yes I wanted to go to street level mapping in the
>>coming days, but I wanted to start with atleast the US and state boundaries
>>with Interstates on it now. I have downloaded the Tiger Line 2000 data for
>>Illinois. I have installed OGR and I am able to see the information through
>>ogrinfo. But, how to I write template file and .map file with layers ? I
>>would greatly appreciate your help.
>>
>>Thanks
>>Sathis
>>At 11:34 PM 2/8/2002 -0500, Walt Lin wrote:
>>
>>>If you just want to draw the state outlines and labels, don't use
>>>TIGER-- use files from nationalatlas.gov . If you need street level
>>>data for the whole US, then tiger is the way to go. Nationalatlas
>>>should have just one layer for states-- setup your .map file for just
>>>one layer and off you go.
>>>
>>>On Fri, Feb 08, 2002 at 05:18:22PM -0600, Sathiskumar Govindasamy wrote:
>>>
>>>>Hello,
>>>>
>>>>I am new to Mapserver. I don't know where to start. I tried to go
>>>>through tutorial I couldn't get much out of it. I wanted the mapserver
>>>>to generate map of US with states marked. I was told to use Tiger Line
>>>>data. I don't loaded tigerline files for Illinois and also boundary line
>>>>shapefiles for all the state states. Can someone tell me how to start or
>>>>point me to some site where they have explained how to use Tiger data ?
>>>>
>>>>Thanks
>>>>Sathis
>>>>
>>>>
>>>>
More information about the MapServer-users
mailing list