Hi,
I've been trying to find out how much work it would be to make
Geoserver support LayerFeatureConstraints (part of SLD standard
UserLayer or NamedLayer).
First I thought there was just a simple mistake in geotools for
NamedLayer, which I tried to fix, described here:
http://jira.codehaus.org/browse/GEOT-2318
Today I managed to compile Geotools 2.5.3 with the above patch and
replaced the main jar in a Geoserver 1.7.2 installation, which makes a
SLD using NamedLayer and LayerFeatureConstraints work without errors,
but it seems like the filter isn't applied. So started to dig in
geoserver code and found the method buildLayersFilters in
main\java\org\vfny\geoserver\wms\responses\GetMapResponse.java
buildLayersFilters seem to not take any consideration to any
LayerFeatureConstraints regardless of UserLayer and/or NamedLayer.
Also these layers seem to be generalized into the class MapLayerInfo
used in GetMapResponse which does not contain any reference to the
LayerFeatureConstraints.
This leads me to believe that adding LayerFeatureConstraints
properties to MapLayerInfo and using it in buildLayersFilters would be
what is missing to support this feature. This seems feasible to do for
us in a short time, but I would like to have your opition if this a
correct observation?
Regards,
Björn Harrtell