[Geoserver-users] wms cql filter question

Hi,

I have a set of points. If I filter some of them out in GetMap request using cql_Filter, are they totally gone? I mean if I then put a GetFeatureInfo tool in my site, I won't get feature info on any "ghosts"?

- mika -

Hi Mika,

You should still get info on the "ghosts". The reason being that a GetMap request takes into account the cql_filter, but the GetFeatureInfo request does not.

Lehtonen, Mika wrote:

Hi,

I have a set of points. If I filter some of them out in GetMap request using cql_Filter, are they totally gone? I mean if I then put a GetFeatureInfo tool in my site, I won't get feature info on any "ghosts"?

- mika -

-------------------------------------------------------------------------
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

--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.

Justin Deoliveira ha scritto:

Hi Mika,

You should still get info on the "ghosts". The reason being that a GetMap request takes into account the cql_filter, but the GetFeatureInfo request does not.

That's a problem I should have fixed quite some time ago.
For example, take this one:

http://sigma.openplans.org:8080/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=topp:states&width=800&height=317&srs=EPSG:4326&CQL_FILTER=PERSONS>1000000

If you click where states are missing, you get no results.

Ah, but if you use the filter integrated in the preview, then
the ghost results do show up... ok, so we have a bug in the
preview, the GetFeatureInfo request of the preview does not
have the filter:
http://jira.codehaus.org/browse/GEOS-2476

Anyways, it's a bug in the preview's javascript, not in the
GetFeatureInfo code itself. Will fix it for 1.7.2 release.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Thanks for the information.

Actually why I started to ask this, was because I've been thinking whether there would be an alternative to markers in Openlayers to use wms instead. I am referring to applications where the number of markers is so big that browser freeze under the load (IE anyway). What you think? If I'd have my points in shp or PostGis and would render them through wms using a proper filter? And with GetFeature(Info) I would get attributes to show e.g. in popups?

- mika -

Andrea Aime kirjoitti:

Justin Deoliveira ha scritto:

Hi Mika,

You should still get info on the "ghosts". The reason being that a GetMap request takes into account the cql_filter, but the GetFeatureInfo request does not.

That's a problem I should have fixed quite some time ago.
For example, take this one:

http://sigma.openplans.org:8080/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=topp:states&width=800&height=317&srs=EPSG:4326&CQL_FILTER=PERSONS>1000000

If you click where states are missing, you get no results.

Ah, but if you use the filter integrated in the preview, then
the ghost results do show up... ok, so we have a bug in the
preview, the GetFeatureInfo request of the preview does not
have the filter:
http://jira.codehaus.org/browse/GEOS-2476

Anyways, it's a bug in the preview's javascript, not in the
GetFeatureInfo code itself. Will fix it for 1.7.2 release.

Cheers
Andrea

Mika Lehtonen ha scritto:

Thanks for the information.

Actually why I started to ask this, was because I've been thinking whether there would be an alternative to markers in Openlayers to use wms instead. I am referring to applications where the number of markers is so big that browser freeze under the load (IE anyway). What you think? If I'd have my points in shp or PostGis and would render them through wms using a proper filter? And with GetFeature(Info) I would get attributes to show e.g. in popups?

Technically it's doable, the only limitation that comes to mind is that
GetFeatureInfo has a hard coded 2 pixels search radius, so people will
click on the markers and may not get back anything.

Taking a larger perspective, if you have so many that the load kills
the browser, you probably have around 1000 markers in the current view... how can a user identify anything meaningful with such a crowded
map?

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Hi Andrea,

you're right about the meaningless of showing 1000 markers. Actually this is not a project of mine so I am commenting only on my behalf. But I believe the problem is that the initial view opens all those 1000 markers anyway in OpenLayers, not sure though. Maybe there is also a possibility to filter out markers with less significancy, I don't know. Anyway, with wms it would be quite easy and doesn't Geoserver do something like that by default or is it just for labels?

What comes to the selecting "markers", if I recall right, someone was using wfs and GetFeature with a bbox which had a size of 5-15 pixels and a center in mouse cursor. That way you have a better possibility to hit the target. But it sounds a little complicated, especially if you are rendering those points with wms.

- mika -

Andrea Aime kirjoitti:

Mika Lehtonen ha scritto:

Thanks for the information.

Actually why I started to ask this, was because I've been thinking whether there would be an alternative to markers in Openlayers to use wms instead. I am referring to applications where the number of markers is so big that browser freeze under the load (IE anyway). What you think? If I'd have my points in shp or PostGis and would render them through wms using a proper filter? And with GetFeature(Info) I would get attributes to show e.g. in popups?

Technically it's doable, the only limitation that comes to mind is that
GetFeatureInfo has a hard coded 2 pixels search radius, so people will
click on the markers and may not get back anything.

Taking a larger perspective, if you have so many that the load kills
the browser, you probably have around 1000 markers in the current view... how can a user identify anything meaningful with such a crowded
map?

Cheers
Andrea

Lehtonen, Mika ha scritto:

Hi Andrea,

you're right about the meaningless of showing 1000 markers. Actually this is not a project of mine so I am commenting only on my behalf. But I believe the problem is that the initial view opens all those 1000 markers anyway in OpenLayers, not sure though. Maybe there is also a possibility to filter out markers with less significancy, I don't know. Anyway, with wms it would be quite easy and doesn't Geoserver do something like that by default or is it just for labels?

It's just for labels.

What comes to the selecting "markers", if I recall right, someone was using wfs and GetFeature with a bbox which had a size of 5-15 pixels and a center in mouse cursor. That way you have a better possibility to hit the target. But it sounds a little complicated, especially if you are rendering those points with wms.

Indeed it is. Still haven't found the time to expose the search radius
as a request parameter, more important stuff keeps dropping on
my desk.

Cheres
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.