[beginner] Why does it look like a map of Arctic Snowfields?

Scott Phillips sphillip at mail.esrp.org
Wed Sep 15 16:48:38 EDT 1999


Jason,

I had this problem too the first time I used my own data with the demo.

My problem was that the extents were not right for my data.  The demo file
comes with map extents set for the demo data and has to be edited to fit
the extent of your data.

For anyone using ArcView, I wrote a small script in Avenue to give you 
a map extent for a shape file that you can copy and paste into your map 
file.  

If you are interested, I compiled it into an (very small) extension and
put it on the web at http://www.phillipsgis.com/dist/mape.avx

It puts an extra menu item called "Get extents" under the Theme menu in 
ArcView.  It returns a dialog box of the stuff you need to paste into 
your map file under "extents".

I wrote it during lunch so its nothing fancy.

I think I'm going to try to make small command line utility that will
spit out the mapextent of a shape file.  From the looks of the shpdump 
sample program in the shapelib, it looks like an easy task.  I'll post
it too if I get it going later.

Scott Phillips
sphillip at esrp.org

' --------------------------------------------------------------
' mape.ave  - an avenue script for arcview to get a dialog box
' showing the map extent to cut and paste into the mapserver
' map file.
' --------------------------------------------------------------

' The first half is taken from the "zoom to theme" system script

av.GetProject.SetModified(true)
theView = av.GetActiveDoc
theThemes = theView.GetActiveThemes
r = Rect.MakeEmpty
for each t in theThemes
  r = r.UnionWith(t.ReturnExtent)
end

' The rest just formats and shows the map extent in a report dialog box
' for copying and pasting

 minx = r.GetLeft.SetFormat("d.ddd").AsString
 miny = r.GetBottom.SetFormat("d.ddd").AsString
 maxx = r.GetRight.SetFormat("d.ddd").AsString
 maxy = r.GetTop.SetFormat("d.ddd").AsString
 theString = "extent"++minx++miny++maxx++maxy

--------------------------------------------------------------



> 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
> 




More information about the mapserver-users mailing list