[mapserver-users] All good!! - Types and multi layeredfiles

Richard Ford mapserver at cubok.com
Tue Aug 21 10:45:53 EDT 2001


> 2)  Multilayed shapefiles.  I have some shapefiles that contain within the
> one file - multiple layers.  How do I get the multiple parts in the
> shapefile to display?  Currently I am only getting one - say a multi layer
> shape file with a bit of land and rivers on it.  I can only get the land
to
> appear and no rivers?

That's what classes are for. Let's say you have a shapefile with land and
water,
with a item in the shapefile called 'TYPE' that allows you to differentiate
between
them. Then you'd define a class like this:

CLASSITEM 'type'
CLASS
  NAME 'Land'
  EXPRESSION 'land'
  COLOR 255 0 0
END

The expression would show polygons where type=land and features not matching
that expression would not be drawn. You can, of course, define multiple
classes.

G'Day Stephen,


I'm sorry, could you explain that a bit more...  Declare 'type' and then
'land' but they must be equal?

In my shapefile there a lot of little area's made by some system - I am not
sure.  Some are clear, some are coloured.  The colour depends on the "level"
of acidity that is, I assume in the dbf file and linked to the shape file.

They each have little tag names.... so would I need to make a class or
classitem for each one?  And how would I make them appear and their colour
change given a value in the database file?

Are there any urls to examples or reference materials that you could point
me to?

Cheers,
Richard.




More information about the mapserver-users mailing list