Shading certain polygons

Doug Nebert ddnebert at usgs.gov
Thu Nov 4 11:33:39 PST 1999


 Stephen Lime wrote:
> 
> Try this:
> 
> CLASSITEM HYC
> CLASS
>   EXPRESSION "8"
>   COLOR 50 50 250
> END
> 
> The / /'s are a perlism I believe and they are
> not necessary. Note the expression "8" matches any
> value with an 8 in it while "^8$" matches only a
> single 8. You can add outlines by defining an outlinecolor.
> 
> Lot's of stratagies for dealing with large shapefiles. One is 
> reduced resolution version, just like you did with the DEM images 
> but with vector data. Another is using spatial indexes. I
> usually work with both. Note, mapserver does not
> use arcview indexes, rather it has it's own
> indexer- shpindex. I can expand on that if anybody
> cares to listen...
> 

Turns out I don't have quite the right content in the global lakes
polygon shapefile that I thought I had. I will work more on it 
in arc/info and re-shape it. I will also use some threshholding 
and create low-res lakes to be shown at certain scales. So how 
does shpindex work?  It would appear that the shapefile is being 
digested when first loaded and that subsequent reads are either 
from memory or an index, yes? At least it seems that second 
draws of a different region are faster than the first access.

Doug.


> Steve
> 
> <<< Doug Nebert <ddnebert at usgs.gov> 11/ 4 12:39p >>>
> Not to sound stupid but might it look like the following?
> 
>   CLASS
>   HYC = 8
>   COLOR 50 50 250
>   END
> 
> The documentation says:
> 
> Regular expression that defines membership in this class. If no
> expression is given then all features are said to belong to this
> class.
> 
> That might imply use of / / characters to evaluate regexp. Do I
> need to use / / at all?
> 
> I would assume that if I assign color I will get no outline, yes?
> 
> I processed all the DCW data as I said I would and have been
> converting it to shapefile from ARC/INFO. The ARCSHAPE command
> doesn't allow for selective polygon exporting since ARC sees
> them as topological polygons, everyone, and the polylines that
> are in shapefiles don't care about their neighbors.
> 
> These are really big shapefiles (80+ MB) so I may need to
> consider tiling.
> 
> Doug.
> 
> Stephen Lime wrote:
> >
> > Declare a class with an expression that matches only the water polys. Shapes without a class are
> > ignored. You could edit the shape file and delete
> > the islands altogether. The hole should still be
> > there but as part of the water shapes. Holes in
> > multipart polygons are rendered correctly. Faster
> > that way, less data and no class expression evaluation.
> >
> > Steve
> >
> > <<< Doug Nebert <ddnebert at usgs.gov> 11/ 4 10:53a >>>
> > I have a complex polygon layer in which I have polygonal water
> > bodies and islands within them.  I need to be able to apply
> > shading to only the water based on an attribute and to have
> > all other valid polygons (like islands) from the shapefile
> > be not shaded.
> >
> > How do I declare this selection in the .map file?
> >
> > --
> > Douglas D. Nebert
> > Clearinghouse Coordinator
> > FGDC Secretariat        Phone: +1 703 648 4151  Fax: +1 703 648-5755
> > Pager Messaging:        http://fgdclearhs.er.usgs.gov/dougmsg.html
> 
> --
> Douglas D. Nebert
> Clearinghouse Coordinator
> FGDC Secretariat        Phone: +1 703 648 4151  Fax: +1 703 648-5755
> Pager Messaging:        http://fgdclearhs.er.usgs.gov/dougmsg.html

-- 
Douglas D. Nebert
Clearinghouse Coordinator 
FGDC Secretariat	Phone: +1 703 648 4151	Fax: +1 703 648-5755	
Pager Messaging: 	http://fgdclearhs.er.usgs.gov/dougmsg.html



More information about the MapServer-users mailing list