SET THE SCALE OF WHERE CLASSES OF FEATURES DISPLAY
Newland Agbenowosi
newland at VT.EDU
Thu Sep 23 14:58:07 PDT 2004
Bob,
Below is an example layer definition showing how to draw the same layer at
different scales by defining the MINSCALE/MAXSCALE for each class. In you
case, you migh need some thing like this:
LAYER
CLASS
EXPRESSION /^1/
MINSCALE ??
MAXSCALE ??
COLOR 100 100 100
SIZE 7
SYMBOL "circle"
END
CLASS
EXPRESSION /^2/
MINSCALE ??
MAXSCALE ??
COLOR 10 10 10
SIZE 7
SYMBOL "circle"
END
CLASS
EXPRESSION /^3/
MINSCALE ??
MAXSCALE ??
COLOR 100 100 100
SIZE 7
SYMBOL "circle"
END
CLASS
EXPRESSION /^4/
MINSCALE ??
MAXSCALE ??
COLOR 10 10 10
SIZE 7
SYMBOL "circle"
END
CLASS
EXPRESSION /^5/
MINSCALE ??
MAXSCALE ??
COLOR 10 10 10
SIZE 7
SYMBOL "circle"
END
CLASS
EXPRESSION /^6/
MINSCALE ??
MAXSCALE ??
COLOR 100 100 100
SIZE 7
SYMBOL "circle"
END
CLASSITEM "<FIELD_NAME>"
END
-------------------------------------------By
example ---------------------------------------
LAYER
NAME "roads"
GROUP "roads"
TYPE LINE
TOLERANCEUNITS pixels
DUMP true
TOLERANCE 5
CLASS
MAXSCALE 20000
COLOR 100 100 100
SIZE 7
SYMBOL "circle"
OVERLAYCOLOR 255 255 2255
OVERLAYSIZE 2
OVERLAYSYMBOL "dash1"
END
CLASS
MINSCALE 20001
MAXSCALE 40000
COLOR 100 100 100
SIZE 5
SYMBOL "circle"
OVERLAYCOLOR 200 200 200
OVERLAYSIZE 3
OVERLAYSYMBOL "circle"
END
CLASS
MINSCALE 40001
COLOR 100 100 100
SIZE 1
SYMBOL "circle"
END
STATUS on
PROJECTION
"init=epsg:4326"
END
DATA "/ms4w/chameleon/data/cities/tema/roads.shp"
METADATA
WMS_TITLE "roads"
WFS_TITLE "roads"
END
END
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of WEST.BOB
Sent: Thursday, September 23, 2004 11:38 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] SET THE SCALE OF WHERE CLASSES OF FEATURES
DISPLAY
I am new to mapserv. I am trying to set-up a map file for roads. I have a
field in my road shape file that has a number from 1 to 6. 6 is the
interstate, 5 are the major roads and it goes down to 1 that are private sub
division roads. I want to set-up one layer with 6 classes, one for each
class of roads. Then at different scales I want to set different classes of
roads to display and to show its name. Seams to me there should be a way to
set the color, the maximum and minimum scale that each class of roads line
shows and a separate setting to set the scale of its label. Can anyone give
me an example MAP file for doing this?
The object of this is so that when I look at the full map all I see are
the interstates and as I zoom in I see more roads and more labels till I get
down to the point I see all roads and labels.
Thanks
Bob West
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20040923/3eaa3fa8/attachment.htm>
More information about the MapServer-users
mailing list