[Mapserver-dev] FeatureID filtering in SLD

Jeremy Wiebe Jwiebe at linnet.ca
Tue Aug 3 14:12:32 EDT 2004


Hi there,

I am wondering if anybody else sees benefit in implementing the <FeatureId>
filter from the Filter Encoding Specification.   I've searched back in the
-dev archives and can only find one reference to this filter type and it
wasn't followed up at all.

A bit of background... our company is using MapServer as a mapping tool with
search capabilities (both spatial and tabular).  The search results are
highlighted on the map.  Currently we use one <Rule> for each matching
feature (only one layer has highlighted features).  This ends up with an SLD
file that grows quite rapidly as features that match the search grow.  (With
about 300 matches you get an SLD file that is over 1 MB).  If we were able
to use the <FeatureId fid="WINNIPEG_1M.1234" /> filter the SLD would shrink
significantly.  

Now, back to the question, would this be useful to anyone?

My second question is about implementation of this.  The SLD contains a
<NamedLayer> element right below the <StyledLayerDescriptor> element.  The
<Rule> and <Filter> elements are nested within this <NamedLayer> element.
As far as I understand the Filter Encoding Spec, the layer name is specified
within the <FeatureId>'s "fid" attribute as such: <FeatureId
fid="MY_LAYER.MY_FEATURE_ID" />

Should the MapServer only accept layer names in the <FeatureId> element that
match the <LayerName> that they are nested in or allow any layer name to be
specified?   

Jeremy Wiebe
Application Developer
Linnet - The Land Systems Company 
1600-444 St. Mary Avenue,  Winnipeg, Manitoba, Canada, R3C 3T1
Tel: 1-204-957-6452  Fax: 1-204-957-7568  email: jwiebe at linnet.ca
http://www.linnet.ca 




More information about the mapserver-dev mailing list