Hi All of You,
is there a way to sort the result of a GetFeatureInfo-output? I found
http://www.freemarker.org/docs/ref_builtins_sequence.html#ref_builtin_sort
but it seems not to match my problem.
Can anybody help?
With best wishes,
Tilo
Hi All of You,
is there a way to sort the result of a GetFeatureInfo-output? I found
http://www.freemarker.org/docs/ref_builtins_sequence.html#ref_builtin_sort
but it seems not to match my problem.
Can anybody help?
With best wishes,
Tilo
Tilo Wütherich ha scritto:
Hi All of You,
is there a way to sort the result of a GetFeatureInfo-output? I found
http://www.freemarker.org/docs/ref_builtins_sequence.html#ref_builtin_sort
but it seems not to match my problem.
That does not work because it works only on a list of primitive data,
a feature collection is not.
Unfortunately we have no way to grab a sorted result from feature info,
there is nothing in the wms spec talking about sorting. If the sort
is always the same and you're playing with a database, you can work
around this by creating a sorted view of your data and register the
view in geoserver as if it was a table.
Otherwise, I think we can consider mimicking wfs 1.1... I can't
remember, Justin, can you sort data using a WFS GetFeature GET request?
Cheers
Andrea
Otherwise, I think we can consider mimicking wfs 1.1... I can't
remember, Justin, can you sort data using a WFS GetFeature GET request?
Yes... but in reality its not that well supported. The query object
passed to the geotools datastores has a sortBy option on it, but in
reality i believe only postgis actually supports it.
I guess we could add an additional parameter to the GetFeatureInfo
operation called sortBy, which basically does what wfs does. As far as I
know the getFeatureInfo calls through to wfs code anyways right? If so
it would seemles... with postgis anyways.
-Justin
Cheers
Andrea!DSPAM:4007,474445b837662092453641!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
Justin Deoliveira ha scritto:
Otherwise, I think we can consider mimicking wfs 1.1... I can't
remember, Justin, can you sort data using a WFS GetFeature GET request?Yes... but in reality its not that well supported. The query object
passed to the geotools datastores has a sortBy option on it, but in
reality i believe only postgis actually supports it.I guess we could add an additional parameter to the GetFeatureInfo
operation called sortBy, which basically does what wfs does. As far as I
know the getFeatureInfo calls through to wfs code anyways right? If so
it would seemles... with postgis anyways.
No it does not. The code path is different because it has to deal
with SLD filters and coverages and whatnot... It may be possible to
share a tiny part of the code with WFS, but really tiny in fact...
See also:
http://jira.codehaus.org/browse/GEOS-1479
Cheers
Andrea
there is nothing in the wms spec talking about sorting. If the sort
is always the same and you're playing with a database, you can work
around this by creating a sorted view of your data and register the
view in geoserver as if it was a table.
Thank you, I think sorted views will do it for my purposes.
Cheers,
Tilo