[Geoserver-users] WMS Spatial request

Hi, I a m using Geoserver + Openlayers.

I am testing filters.

If i have thsi filter for a WFS layer :
<Filter><Beyond><PropertyName>the_geom</PropertyName><gml:Point srsName="EPSG:2154">
<gml:coordinates>592681,2440367</gml:coordinates></gml:Point><Distance units="m">1000</Distance>
</Beyond></Filter>

everything is fine.

IF I change the request for a WMS layer, I get

org.vfny.geoserver.ServiceException: org.xml.sax.SAXException: Attempted to con
truct illegal filter - I dont understand the tag: gml:Point. HINT: tags are case
sensitive!

I have tried differnet requests, getting the gml: part oout, no luck.
Has anybody a clue ?

--
Cordialement

Bernard Jousse (bjousse@anonymised.com)
06 77 15 69 44

hmmm try declaring the ogc namespace in the <Filter> element like this:

<Filter xmlns=%22http://www.opengis.net/ogc%22…

(note: %22 accounts for the http encoded value of the double quote character)

I guess that'd do the trick. Write back if not, I'll try to find out what's
happening

cheers,

Gabriel

On Sunday 13 January 2008 11:05:28 pm Bernard Jousse wrote:

Hi, I a m using Geoserver + Openlayers.

I am testing filters.

If i have thsi filter for a WFS layer :
<Filter><Beyond><PropertyName>the_geom</PropertyName><gml:Point
srsName="EPSG:2154">
<gml:coordinates>592681,2440367</gml:coordinates></gml:Point><Distance
units="m">1000</Distance> </Beyond></Filter>

everything is fine.

IF I change the request for a WMS layer, I get

org.vfny.geoserver.ServiceException: org.xml.sax.SAXException: Attempted to
con truct illegal filter - I dont understand the tag: gml:Point. HINT:
tags are case sensitive!

I have tried differnet requests, getting the gml: part oout, no luck.
Has anybody a clue ?

Well, now Geooserver does not complain. I just have no data selected in WMS.
Might be the way I give the distance.

Gabriel Roldán-3 wrote:

hmmm try declaring the ogc namespace in the <Filter> element like this:

<Filter xmlns=%22http://www.opengis.net/ogc%22…

(note: %22 accounts for the http encoded value of the double quote
character)

On Sunday 13 January 2008 11:05:28 pm Bernard Jousse wrote:

Hi, I a m using Geoserver + Openlayers.

I am testing filters.

If i have thsi filter for a WFS layer :
<Filter><Beyond><PropertyName>the_geom</PropertyName><gml:Point
srsName="EPSG:2154">
<gml:coordinates>592681,2440367</gml:coordinates></gml:Point><Distance
units="m">1000</Distance> </Beyond></Filter>

--
View this message in context: http://www.nabble.com/WMS-Spatial-request-tp14791850p14796530.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

bjousse ha scritto:

Well, now Geooserver does not complain. I just have no data selected in WMS.
Might be the way I give the distance.

Nope, I can confirm it's a bug with the shapefile renderer (you're using
shapefiles as your data source, right?).

If I run the following request with the properly parseable filter against a demo server we have:
http://geo.openplans.org:8080/geoserver/wms?bbox=-130,24,-66,50&styles=population&Format=image/png&request=GetMap&layers=topp:states&width=550&height=250&srs=EPSG:4326&filter=<Filter%20xmlns="http://www.opengis.net/ogc"%20xmlns:gml="http://www.opengis.net/gml"><Beyond><PropertyName>the_geom</PropertyName><gml:Point%20srsName="EPSG:2154"><gml:coordinates>-106,39</gml:coordinates></gml:Point><Distance>0.5</Distance></Beyond></Filter>

the result is an empty map. If I run the same request on GeoServer trunk
the result is correct instead (all the states besides Colorado). This means there is some bug in the interpretation of a beyond filter that has been fixed on geotools trunk only (geotools being the library we
use for data access, rendering and so on).

I'll investigate, thanks for reporting.
http://jira.codehaus.org/browse/GEOS-1667
Cheers
Andrea

Yes, I work with shapes. I'll try with another filter (DWITHIN probably)
ASAP. As long as I can run my next demo, I am not in a hurry...

aaime wrote:

Nope, I can confirm it's a bug with the shapefile renderer (you're using
shapefiles as your data source, right?).

--
View this message in context: http://www.nabble.com/WMS-Spatial-request-tp14791850p14798521.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

bjousse ha scritto:

Yes, I work with shapes. I'll try with another filter (DWITHIN probably)
ASAP. As long as I can run my next demo, I am not in a hurry...

Well, if you need that filter to work, you can also dump all of your
data into a postgis database, there it should work fine.
Cheers
Andrea

Is this just BEYOND and DWITHIN, or could I use an Intersects against a
Polygon ?

aaime wrote:

Well, if you need that filter to work, you can also dump all of your
data into a postgis database, there it should work fine.
Cheers
Andrea

--
View this message in context: http://www.nabble.com/WMS-Spatial-request-tp14791850p14799324.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

bjousse ha scritto:

Is this just BEYOND and DWITHIN, or could I use an Intersects against a
Polygon ?

I have no idea about the nature of the bug, still haven't looked into
it, so I don't know what spatial predicates you can or cannot use
successfully. If you use a postgis database you'll be able to use
them all.

Or, you can switch back to geoserver 1.5.x for the time being,
shapefile rendering is visibly slower but at least the bug it's
not there.

Cheers
Andrea

Hi Bernard,

Which version of 1.6.x are you working with... i thought i fixed this
issue of having to declare the filter namespace... perhaps not.

Gabriel Roldán wrote:

hmmm try declaring the ogc namespace in the <Filter> element like this:

<Filter xmlns=%22http://www.opengis.net/ogc%22…

(note: %22 accounts for the http encoded value of the double quote character)

I guess that'd do the trick. Write back if not, I'll try to find out what's
happening

cheers,

Gabriel

On Sunday 13 January 2008 11:05:28 pm Bernard Jousse wrote:

Hi, I a m using Geoserver + Openlayers.

I am testing filters.

If i have thsi filter for a WFS layer :
<Filter><Beyond><PropertyName>the_geom</PropertyName><gml:Point
srsName="EPSG:2154">
<gml:coordinates>592681,2440367</gml:coordinates></gml:Point><Distance
units="m">1000</Distance> </Beyond></Filter>

everything is fine.

IF I change the request for a WMS layer, I get

org.vfny.geoserver.ServiceException: org.xml.sax.SAXException: Attempted to
con truct illegal filter - I dont understand the tag: gml:Point. HINT:
tags are case sensitive!

I have tried differnet requests, getting the gml: part oout, no luck.
Has anybody a clue ?

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478a8cac99871637810514!

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Hi Justin,

I just downloaded the 1.6.0 RC-2 about 2 weeks ago. Hi Kustin,

Justin Deoliveira a écrit :

Hi Bernard,

Which version of 1.6.x are you working with... i thought i fixed this
issue of having to declare the filter namespace... perhaps not.

Gabriel Roldán wrote:

hmmm try declaring the ogc namespace in the <Filter> element like this:

<Filter xmlns=%22http://www.opengis.net/ogc%22…

(note: %22 accounts for the http encoded value of the double quote character)

I guess that'd do the trick. Write back if not, I'll try to find out what's happening

cheers,

Gabriel

On Sunday 13 January 2008 11:05:28 pm Bernard Jousse wrote:

Hi, I a m using Geoserver + Openlayers.

I am testing filters.

If i have thsi filter for a WFS layer :
<Filter><Beyond><PropertyName>the_geom</PropertyName><gml:Point
srsName="EPSG:2154">
<gml:coordinates>592681,2440367</gml:coordinates></gml:Point><Distance
units="m">1000</Distance> </Beyond></Filter>

everything is fine.

IF I change the request for a WMS layer, I get

org.vfny.geoserver.ServiceException: org.xml.sax.SAXException: Attempted to
con truct illegal filter - I dont understand the tag: gml:Point. HINT:
tags are case sensitive!

I have tried differnet requests, getting the gml: part oout, no luck.
Has anybody a clue ?

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,478a8cac99871637810514!

--
Cordialement

Bernard Jousse (bjousse@anonymised.com)
06 77 15 69 44

Hi,

FYI I tested DWHITIN, BEYOND, WITHIN + polygon , INTERSECTS + POINT : none
gives answers..

bjousse wrote:

Hi Justin,

I just downloaded the 1.6.0 RC-2 about 2 weeks ago. Hi Kustin,

--
View this message in context: http://www.nabble.com/WMS-Spatial-request-tp14791850p14812187.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

bjousse ha scritto:

Hi,

FYI I tested DWHITIN, BEYOND, WITHIN + polygon , INTERSECTS + POINT : none
gives answers..

Yep, I confirmed that. I think I have fixed the issue.
Can you download http://jira.codehaus.org/secure/attachment/31879/gt2-shapefile-renderer-2.4-SNAPSHOT.jar,
paste it into your geoserver 1.6.0-Rc2 web-inf/lib
directory (it will replace an existing one) and see if it works for you?
Cheers
Andrea

OK, I tried different requests in the same map as WMS and superimposed the sams as WFS

As long as I dont do DWITHIN or BEYOND, everything fits.

If I do a Beyond or a DWITHIN, it looks like the WMS distance ichanges with the zoom level. I superimposed the same request in WFS and WMS, When I zomm out, i get less featues (points) in WFS than in WMS, when I zoom in, I get more. the common points ovelap perfectly.....
I have two other point layers WMS/WFS in this map, but they have no request on them, and I do not see this effect.

screen shots available if you want..

Andrea Aime a écrit :

bjousse ha scritto:

Hi,

FYI I tested DWHITIN, BEYOND, WITHIN + polygon , INTERSECTS + POINT : none
gives answers..

Yep, I confirmed that. I think I have fixed the issue.
Can you download http://jira.codehaus.org/secure/attachment/31879/gt2-shapefile-renderer-2.4-SNAPSHOT.jar,

paste it into your geoserver 1.6.0-Rc2 web-inf/lib
directory (it will replace an existing one) and see if it works for you?
Cheers
Andrea

--
Cordialement

Bernard Jousse (bjousse@anonymised.com)

Bernard Jousse ha scritto:

OK, I tried different requests in the same map as WMS and superimposed the sams as WFS

As long as I dont do DWITHIN or BEYOND, everything fits.

If I do a Beyond or a DWITHIN, it looks like the WMS distance ichanges with the zoom level. I superimposed the same request in WFS and WMS, When I zomm out, i get less featues (points) in WFS than in WMS, when I zoom in, I get more. the common points ovelap perfectly.....
I have two other point layers WMS/WFS in this map, but they have no request on them, and I do not see this effect.

Right, managed to reproduce it as well. Should be fixed with this new jar, can you test it?
http://jira.codehaus.org/secure/attachment/31905/gt2-shapefile-renderer-2.4-SNAPSHOT.jar

Cheers
Andrea

Sorry, still the same, too many points or not enough depending on the zoom
ratio

aaime wrote:

Right, managed to reproduce it as well. Should be fixed with this new
jar, can you test it?
http://jira.codehaus.org/secure/attachment/31905/gt2-shapefile-renderer-2.4-SNAPSHOT.jar

Cheers
Andrea

--
View this message in context: http://www.nabble.com/WMS-Spatial-request-tp14791850p14886379.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

bjousse ha scritto:

Sorry, still the same, too many points or not enough depending on the zoom
ratio

Strange, I've tried it with different layers and it seems to be working
for me... hmm... rc3 is about to go out and I cannot stop it anymore, so
let's do this: you try rc3, if you can reproduce again, open a jira
issue with the data and the filter you're using so that I can see what's
off.

Cheers
Andrea

OK. Thanks for all the time spent

Andrea Aime a écrit :

bjousse ha scritto:

Sorry, still the same, too many points or not enough depending on the zoom
ratio

Strange, I've tried it with different layers and it seems to be working
for me... hmm... rc3 is about to go out and I cannot stop it anymore, so
let's do this: you try rc3, if you can reproduce again, open a jira
issue with the data and the filter you're using so that I can see what's
off.

Cheers
Andrea

--
Cordialement

Bernard Jousse (bjousse@anonymised.com)