[Mapserver-users] Re: help me !!!

Dylan Keon keon at nacse.org
Tue Mar 2 11:00:58 PST 2004


Dharani,

I haven't played around with tiger line data.  You probably just need to 
set LABELITEM for each layer, then define a LABEL object within each 
CLASS.  Here are a couple of posts from the archives that might help:

http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0202/msg00113.html
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0301/msg00553.html

You might also find some clues on the OGR howto page:
http://mapserver.gis.umn.edu/doc/ogr-howto.html

--Dylan



Dharani Babu wrote:
> Mr.Keon
> I am dharani babu from chennai , india . I found your reference at
> http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0308/msg00012.html 
> .( I am sending this mail after posting several time to map server list )
> 
>     I am a new map server user . I request you to consider help me with 
> my problem .I have been as of now able to render TIGER file maps thro 
> Mapserver . I have the ms4w package set up and have apache running . I 
> am now able to render theTIGER files' CompleteChain , Landmarks and PIP 
> . But I am trying to find hard to display the names ( labels right)on 
> the streets and landmarks and capitals .To tell you what I did .....I 
> ran ogrinfo on the tiger folder and got the following Layers .
> Had to open data source read-only.
> INFO: Open of `c:/ms4w/apache/htdocs/demof/data/rm'
> using driver `TIGER' successful.
> 1: CompleteChain (Line String)
> 2: AltName (None)
> 3: FeatureIds (None)
> 4: ZipCodes (None)
> 5: Landmarks (Point)
> 6: AreaLandmarks (None)
> 7: KeyFeatures (None)
> 8: Polygon (None)
> 9: EntityNames (Point)
> 10: IDHistory (None)
> 11: PolyChainLink (None)
> 12: PIP (Point)
> 13: TLIDRange (None)
> 14: ZipPlus4 (None)
> And I am pasting the mapfile content I use. Please go thro it and advise 
> me WHERE and HOW Should I add
> the LABELs ? So that I can get the names of capitals and landmarks and 
> streets displayed on the
> map . I tried to add the LABEL defintions(which I found in your message) 
> to the LAYERS but got mapserver error .
> 
> #
> # Start of map file
> #
> NAME DEMO
> STATUS ON
> SIZE 600 600
> EXTENT -71.451310 42.737590 -70.575094 43.274201
> #UNITS DEGREES
> SHAPEPATH "C:/ms4w/apache/htdocs/demof/data/rm/"
> IMAGECOLOR 255 255 255
> 
> IMAGETYPE png
> 
> #
> # Projection definition, consult the PROJ.4 documentation for parameter 
> discussi
> #
> #PROJECTION
> #  "proj=utm"
> #  "ellps=GRS80"
> #  "zone=10"
> #  "north"
> #  "no_defs"
> #  "init=EPSG:26910"
> #END
> 
> #
> # Start of web interface definition
> #
> WEB
>  HEADER tiger
>  TEMPLATE temp_rm4.html
>  FOOTER demo_footer.html
> #  MINSCALE 1000
> #  MAXSCALE 1550000
>  IMAGEPATH "C:/ms4w/apache/htdocs/temp_rm1/"
>  IMAGEURL "/temp_rm1/"
>  # LOG "demo.log"
> END
> 
> QUERYMAP
>  SIZE 200 200
>  STATUS ON
>  STYLE HILITE
>  COLOR 255 0 0
> END
> 
> #
> # Start of reference map
> #
> REFERENCE
>  IMAGE graphics/dem.gif
>  EXTENT 481314.93 5620068.63 703440.19 5837331.76
>  SIZE 200 192
>  STATUS OFF
>  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
> 
> #
> # Setting up output formats
> #
> 
> #OUTPUTFORMAT
> # NAME png
>  #DRIVER "GD/PNG"
>  #MIMETYPE "image/png"
>  #IMAGEMODE RGB #PC256
>  #EXTENSION "png"
> #END
> 
> #
> # Start of scalebar
> #
> SCALEBAR
>  IMAGECOLOR 255 255 255
>  LABEL
>    COLOR 255 255 255
>    SIZE tiny
>  END
>  STYLE 1
>  SIZE 50 2
>  COLOR 255 255 255
>  UNITS KILOMETERS
>  INTERVALS 1
>  TRANSPARENT TRUE
>  STATUS TRUE
> END
> 
> 
> SYMBOL
>  NAME "circle"
>  TYPE ellipse
>  FILLED true
>  POINTS
>    1 1
>  END
> END
> 
> #
> # Start of layer definitions
> #
> 
> LAYER
> GROUP tigerdata
> NAME tiger1
> TYPE LINE
> STATUS DEFAULT
> CONNECTIONTYPE OGR
> CONNECTION "C:/ms4w/apache/htdocs/demof/data/rm"
> DATA "CompleteChain"
> CLASS
> SYMBOL "circle"
> SIZE 1
> COLOR 200 0 0
> END
> END
> 
> 
> LAYER
> GROUP tigerdata
> NAME tiger5
> TYPE POLYGON
> STATUS DEFAULT
> CONNECTIONTYPE OGR
> CONNECTION "C:/ms4w/apache/htdocs/demof/data/tigertest"
> DATA "Landmarks"
> CLASS
> SYMBOL "circle"
> SIZE 1
> COLOR 200 0 0
> END
> END
> 
> LAYER
> GROUP tigerdata
> NAME tiger12
> TYPE POINT
> STATUS DEFAULT
> CONNECTIONTYPE OGR
> CONNECTION "C:/ms4w/apache/htdocs/demof/data/tigertest"
> DATA "PIP"
> CLASS
> SYMBOL "circle"
> SIZE 8
> COLOR 0 0 200
> END
> END
> 
> END  # Map file
> 
> Please advise me with the above stuff !!! As you can see I have been 
> able to render the LAYERS which have geometry ( line and point ) but I 
> dont know what I can do with layers that have no geomoetry . ...
> Expecting your reply
> With regards and thanks in advance
> dharani



More information about the MapServer-users mailing list