[Geoserver-users] Point Selection/Intersection Problem w/ 900913

All,

I'm using Geoserver with OpenLayers to create a javascript map that
allows user's to select features. When the user clicks on the map, it
makes a get feature request using a bbox filter to get the desired
feature. Ideally, I'd like to use an intersect filter instead, but when
I try it, geoserver doesn't return any result (when the bbox request
does). David Winslow tells me this has something to do with EPSG 900913
and reprojection. Would anyone have any idea why I'd be seeing this
behavior?

I've included two requests that should show you what's going on. The
first is the bbox request which returns the correct feature. The second
is a very similar intersect request which seems to return zero features
(gml:null). Both requests are made to demo.opengeo.org/alachua/wfs,
which is a public server.

bbox request: http://pastebin.com/f165d829
intersect request: http://pastebin.com/f39343b5d

Both requests should return the same feature. The data is stored in EPSG
2238, but is shown in OpenLayers as EPSG 900913.

Thanks a lot for your help!
Tim

Hi,

Below is the query that OpenJUMP WFS plugin creates for bounding box query. It is not "intersect with box" query what you are trying to use, but it seems to contain gml:Box element which is written in a different way than you do. Perhaps there is something you might have a look at?

-Jukka Rahkonen-

<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS" version="1.0.0" maxFeatures="1000" outputFormat="GML2">
<wfs:Query xmlns:topp="http://www.openplans.org/topp&quot; srsName="EPSG:4326" typeName="topp:states">
<ogc:Filter>
<ogc:BBOX>
<ogc:PropertyName>
topp:the_geom</ogc:PropertyName>
<gml:Box>
<gml:coord>
<gml:X>
-125.964082115</gml:X>
<gml:Y>
14.004707960577342</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>
-65.737188885</gml:X>
<gml:Y>
60.32299403942266</gml:Y>
</gml:coord>
</gml:Box>
</ogc:BBOX>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>

-----Alkuperäinen viesti-----
Lähettäjä: geoserver-users-bounces@lists.sourceforge.net puolesta: Tim Coulter
Lähetetty: pe 18.7.2008 22:16
Vastaanottaja: geoserver-users@lists.sourceforge.net
Aihe: [Geoserver-users] Point Selection/Intersection Problem w/ 900913

All,

I'm using Geoserver with OpenLayers to create a javascript map that
allows user's to select features. When the user clicks on the map, it
makes a get feature request using a bbox filter to get the desired
feature. Ideally, I'd like to use an intersect filter instead, but when
I try it, geoserver doesn't return any result (when the bbox request
does). David Winslow tells me this has something to do with EPSG 900913
and reprojection. Would anyone have any idea why I'd be seeing this
behavior?

I've included two requests that should show you what's going on. The
first is the bbox request which returns the correct feature. The second
is a very similar intersect request which seems to return zero features
(gml:null). Both requests are made to demo.opengeo.org/alachua/wfs,
which is a public server.

bbox request: http://pastebin.com/f165d829
intersect request: http://pastebin.com/f39343b5d

Both requests should return the same feature. The data is stored in EPSG
2238, but is shown in OpenLayers as EPSG 900913.

Thanks a lot for your help!
Tim

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi Tim,

Not sure if you have solved this one or not... if so please ignore :slight_smile:

My guess would be that you stumbled upon a bug transferring the xml filter to a predicate in the WHERE class in teh backend query. You are using postGIS correct?

Looking at the GeoServer logs should show you exactly the SQL query made to the backend. I tried to log into that server to view the logs myself but I dont seem to have access.

-Justin

Tim Coulter wrote:

All,

I'm using Geoserver with OpenLayers to create a javascript map that
allows user's to select features. When the user clicks on the map, it
makes a get feature request using a bbox filter to get the desired
feature. Ideally, I'd like to use an intersect filter instead, but when
I try it, geoserver doesn't return any result (when the bbox request
does). David Winslow tells me this has something to do with EPSG 900913
and reprojection. Would anyone have any idea why I'd be seeing this
behavior?

I've included two requests that should show you what's going on. The
first is the bbox request which returns the correct feature. The second
is a very similar intersect request which seems to return zero features
(gml:null). Both requests are made to demo.opengeo.org/alachua/wfs,
which is a public server.

bbox request: http://pastebin.com/f165d829
intersect request: http://pastebin.com/f39343b5d

Both requests should return the same feature. The data is stored in EPSG
2238, but is shown in OpenLayers as EPSG 900913.

Thanks a lot for your help!
Tim

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,4880ec2d30325210051143!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Hi Justin,

the Intersects filter works fine with point or linestring geometries. But not with box.

We were able to work around the issue by using a point geometry, but I think this is still something to investigate.

Regards,
Andreas.

Justin Deoliveira wrote:

Hi Tim,

Not sure if you have solved this one or not... if so please ignore :slight_smile:

My guess would be that you stumbled upon a bug transferring the xml filter to a predicate in the WHERE class in teh backend query. You are using postGIS correct?

Looking at the GeoServer logs should show you exactly the SQL query made to the backend. I tried to log into that server to view the logs myself but I dont seem to have access.

-Justin

Tim Coulter wrote:
  

All,

I'm using Geoserver with OpenLayers to create a javascript map that
allows user's to select features. When the user clicks on the map, it
makes a get feature request using a bbox filter to get the desired
feature. Ideally, I'd like to use an intersect filter instead, but when
I try it, geoserver doesn't return any result (when the bbox request
does). David Winslow tells me this has something to do with EPSG 900913
and reprojection. Would anyone have any idea why I'd be seeing this
behavior?

I've included two requests that should show you what's going on. The
first is the bbox request which returns the correct feature. The second
is a very similar intersect request which seems to return zero features
(gml:null). Both requests are made to demo.opengeo.org/alachua/wfs,
which is a public server.

bbox request: http://pastebin.com/f165d829
intersect request: http://pastebin.com/f39343b5d

Both requests should return the same feature. The data is stored in EPSG
2238, but is shown in OpenLayers as EPSG 900913.

Thanks a lot for your help!
Tim

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,4880ec2d30325210051143!

Cool, thanks Andreas. Is there a bug report filed or it already? If so I will go ahead and file one.

-Justin

Andreas Hocevar wrote:

Hi Justin,

the Intersects filter works fine with point or linestring geometries. But not with box.

We were able to work around the issue by using a point geometry, but I think this is still something to investigate.

Regards,
Andreas.

Justin Deoliveira wrote:

Hi Tim,

Not sure if you have solved this one or not... if so please ignore :slight_smile:

My guess would be that you stumbled upon a bug transferring the xml filter to a predicate in the WHERE class in teh backend query. You are using postGIS correct?

Looking at the GeoServer logs should show you exactly the SQL query made to the backend. I tried to log into that server to view the logs myself but I dont seem to have access.

-Justin

Tim Coulter wrote:
  

All,

I'm using Geoserver with OpenLayers to create a javascript map that
allows user's to select features. When the user clicks on the map, it
makes a get feature request using a bbox filter to get the desired
feature. Ideally, I'd like to use an intersect filter instead, but when
I try it, geoserver doesn't return any result (when the bbox request
does). David Winslow tells me this has something to do with EPSG 900913
and reprojection. Would anyone have any idea why I'd be seeing this
behavior?

I've included two requests that should show you what's going on. The
first is the bbox request which returns the correct feature. The second
is a very similar intersect request which seems to return zero features
(gml:null). Both requests are made to demo.opengeo.org/alachua/wfs,
which is a public server.

bbox request: http://pastebin.com/f165d829
intersect request: http://pastebin.com/f39343b5d

Both requests should return the same feature. The data is stored in EPSG
2238, but is shown in OpenLayers as EPSG 900913.

Thanks a lot for your help!
Tim

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,488983e0186407180515871!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Justin Deoliveira wrote:

Cool, thanks Andreas. Is there a bug report filed or it already? If so I will go ahead and file one.

Thanks Justin. There is none I think.

Andreas.