Jessica M Salmon wrote:
Geotools Folks,
Can any y'all point me in the right direction for sorting a
FeatureCollection based on an attribute. I don't want to re-invent any
wheels, but I'm having trouble guessing how to do it properly within the
geotools api. I'm using 2.1.0, and already applying a geometry filter and a
between (for a time range) filter to my postgis data, so I'm hoping to find
a way to create another (sorting) filter to chain on with the others. Is
this possible?
Sorting is not supported in 2.1.0, we have the API in 2.2.x but I do not
think anyone has implemented
a useful SQL based solution for the database datastores.
The initial focus is shapefile, and presenting a random access api (aka
FeatureList) for shapefile. There
is the Filter 1.1 sortBy constructs in the code base, and a start in the
direction of sorting.
I hope that makes sense? A FeatureCollection is unsorted, a FeatureList
has an order and thus can be sorted. I had also thought about
using a TreeSet but did not get any feedback either way ...
Cheers,
Jody
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users