Filter Shapefile
Andreas Albarello
andreas.albarello at TERRITORIUMONLINE.COM
Fri Apr 20 06:08:08 EDT 2007
Hallgren Johan E wrote:
> Hello
>
> I was trying to use LAYER/FILTER to show a subset of a shapefile.
>
> LAYER
> NAME TATYT
> TYPE POLYGON
> STATUS ON
> DATA vv/TATYT
> TEMPLATE "c:\temp\template.txt"
> MAXSCALE 1000000
> FILTER "BEF > 1000000"
> CLASS
> NAME TatYt
> STYLE
> OUTLINECOLOR 0 0 0
> COLOR 210 210 210
> END
> END
> END
>
> But nothing happened. All features are shown and when retrieving
> features, all features are retrieved.
>
> Did I misunderstand the purpose of FILTER?
Johan,
the following document explains how filters and expressions work with
shape files:
http://mapserver.gis.umn.edu/docs/howto/msexpressions/?searchterm=FILTER
I'd suggest you give especially the paragraph at the very end of the
document about how attributes are referenced inside expressions a good read.
In fact, your filter should look like this in order to work properly:
FILTER ([BEF] > 1000000)
Best regards,
--
--------------------------------------------------------------------
Andreas Albarello
Analysis & SW Development
Territorium Online srl/GmbH
Via Buozzi/Buozzistraße 12 - I 39100 Bolzano/Bozen
email: andreas.albarello at territoriumonline.com
web: www.territoriumonline.com
--------------------------------------------------------------------
More information about the mapserver-dev
mailing list