[Geoserver-users] strange getFeatureBBOX behaviour

Hi GeoServer people,

I am getting strange behaviour with the WFS_getFeatureBBOX.url.

Either the WFS request doesn’t return what it should, or I am missunderstanding what it is designed for.

In GeoServer Demo Request, the WFS_getFeatureBBOX.url is :

http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&propertyName=STATE_NAME,PERSONS&BBOX=-75.102613,40.212597,-72.361859,41.512517,EPSG:4326

(This request uses the topp:states layer that comes with GeoServer installation)

I changed the coordinates of the bbox to "-119.5,39,-119,40 " to show this strange behaviour.

This “-119.5,39,-119,40” bbox is a small rectangle all in Nevada but close to California border.

The WFS request is then :

http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&propertyName=STATE_NAME,PERSONS&BBOX=-119.5,39,-119,40,EPSG:4326

This request returns Nevada and California. I can’t understand why California stands in the results although the bbox is fully in Nevada.

After a few investigations on the topp:states layer and other polygons and lines layers, it seems that the above WFS_getFeatureBBOX.url selects all feautures whose bounding boxes intersect the request bbox. For example, in the above example, the “-119.5,39,-119,40” bbox is fully outside California but it is inside California’s bounding box, so California is selected.

Is this the way the WFS_getFeatureBBOX.url works or is this a bug ?

And what WFS url request could select the shapes that only intersect a bbox, and not the shapes whose bounding boxes intersect a bbox ?

Thanks in advance

Blaise

Blaise PICINBONO

Ingénieur SIG


Alyotech-Technologies_Q30.jpg

ALYOTECH TECHNOLOGIES

2, rue Antoine Becquerel

35700 RENNES

Tél. 02 23 21 11 11

Fax. 02.23.21.11.00

www.alyotech.fr

P N’imprimez ce mail que si c’est vraiment nécessaire____.

Hi,

You are right, BBOX is searching for intersecting envelopes. It is faster and just OK when browsing around the map while doing some on-screen work. For accurate results use “intersects”.

This should be good enough, even not exact match:
http://lyceum.massgis.state.ma.us/wiki/doku.php?id=query_benchmarks&rev=1236037547

-Jukka Rahkonen-


Lähettäjä: PICINBONO Blaise [mailto:blaise.picinbono@anonymised.com]
Lähetetty: 5. kesäkuuta 2009 12:21
Vastaanottaja: geoserver-users@lists.sourceforge.net
Aihe: [Geoserver-users] strange getFeatureBBOX behaviour

Hi GeoServer people,

I am getting strange behaviour with the WFS_getFeatureBBOX.url.

Either the WFS request doesn’t return what it should, or I am missunderstanding what it is designed for.

In GeoServer Demo Request, the WFS_getFeatureBBOX.url is :

http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&propertyName=STATE_NAME,PERSONS&BBOX=-75.102613,40.212597,-72.361859,41.512517,EPSG:4326

(This request uses the topp:states layer that comes with GeoServer installation)

I changed the coordinates of the bbox to "-119.5,39,-119,40 " to show this strange behaviour.

This “-119.5,39,-119,40” bbox is a small rectangle all in Nevada but close to California border.

The WFS request is then :

http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=topp:states&propertyName=STATE_NAME,PERSONS&BBOX=-119.5,39,-119,40,EPSG:4326

This request returns Nevada and California. I can’t understand why California stands in the results although the bbox is fully in Nevada.

After a few investigations on the topp:states layer and other polygons and lines layers, it seems that the above WFS_getFeatureBBOX.url selects all feautures whose bounding boxes intersect the request bbox. For example, in the above example, the “-119.5,39,-119,40” bbox is fully outside California but it is inside California’s bounding box, so California is selected.

Is this the way the WFS_getFeatureBBOX.url works or is this a bug ?

And what WFS url request could select the shapes that only intersect a bbox, and not the shapes whose bounding boxes intersect a bbox ?

Thanks in advance

Blaise

Blaise PICINBONO

Ingénieur SIG


Alyotech-Technologies_Q30.jpg

ALYOTECH TECHNOLOGIES

2, rue Antoine Becquerel

35700 RENNES

Tél. 02 23 21 11 11

Fax. 02.23.21.11.00

www.alyotech.fr

P N’imprimez ce mail que si c’est vraiment nécessaire____.