Hi Everyone,
I'm running GeoServer 1.7.0-RC2. I have a Postgis datastore set up and have created two featuretypes, nws:mobile_feature and nws:product_location that point at to different tables in the database. I am making the following WMS request:
http://myserver/geoserver/wms?
HEIGHT=450&
WIDTH=450&
LAYERS=nws:mobile_feature,nws:product_location&
STYLES=&
SRS=EPSG:900913&
FORMAT=image/png&
SERVICE=WMS&VERSION=1.1.1&
REQUEST=GetMap&
EXCEPTIONS=application/vnd.ogc.se_inimage&
transparent=true&
BBOX=-9880057.0934281,4530242.2483719,-9329710.4893574,5080588.8514528&
FEATUREID=nws:mobile_feature.3907
You can see from the request that I'm requesting two layers, nws:mobile_feature and nws:product_location and I am using a FEATUREID filter to display only the nws:mobile_feature with an id of 3907. It would make sense that the result should display only the single nws:mobile_feature and no nws:product_location features (because I am not specifying any nws:product_location features in the filter). The problem is that the FEATUREID=nws:mobile_feature.3907 filter is getting applied to both the nws:mobile_feature and nws:product_location layers. The resulting image displays two features, the nws:mobile_feature with an id of 3907 and the nws:product_location with an id of 3907. It should be displaying only the nws:mobile_feature with an id of 3907 if the filter is working properly.
I have also tried formatting my filter like FEATUREID=mobile_feature.3907 which does not seem to help. Is the layer name part of the featureid argument ignored? Maybe I have misunderstood how featureid filters work.
I'd appreciate any ideas you have.
Thank you,
Aaron
Aaron Sutula ha scritto:
Hi Everyone,
I'm running GeoServer 1.7.0-RC2. I have a Postgis datastore set up and have created two featuretypes, nws:mobile_feature and nws:product_location that point at to different tables in the database. I am making the following WMS request:
http://myserver/geoserver/wms?
HEIGHT=450&
WIDTH=450&
LAYERS=nws:mobile_feature,nws:product_location&
STYLES=&
SRS=EPSG:900913&
FORMAT=image/png&
SERVICE=WMS&VERSION=1.1.1&
REQUEST=GetMap&
EXCEPTIONS=application/vnd.ogc.se_inimage&
transparent=true&
BBOX=-9880057.0934281,4530242.2483719,-9329710.4893574,5080588.8514528&
FEATUREID=nws:mobile_feature.3907
You can see from the request that I'm requesting two layers, nws:mobile_feature and nws:product_location and I am using a FEATUREID filter to display only the nws:mobile_feature with an id of 3907. It would make sense that the result should display only the single nws:mobile_feature and no nws:product_location features (because I am not specifying any nws:product_location features in the filter). The problem is that the FEATUREID=nws:mobile_feature.3907 filter is getting applied to both the nws:mobile_feature and nws:product_location layers. The resulting image displays two features, the nws:mobile_feature with an id of 3907 and the nws:product_location with an id of 3907. It should be displaying only the nws:mobile_feature with an id of 3907 if the filter is working properly.
I have also tried formatting my filter like FEATUREID=mobile_feature.3907 which does not seem to help. Is the layer name part of the featureid argument ignored? Maybe I have misunderstood how featureid filters work.
I'd appreciate any ideas you have.
Hmm.. yeah, not surprised it's happening. What's going on is that
the filter is passed down to the datastores, which blindly strip
out the typename part and just use the numeric one (and thus
the result you're getting).
I believe 1.7.4 won't have the same issue for postgis data, but
I haven't tried (but I know we started validating the typename
part is some jdbc databases after 1.7.0).
So, I'd suggest you get 1.7.3 or 1.7.4 and try it out
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.