SubFeatureCollection with Filter.INCLUDE throws excpetion
---------------------------------------------------------
Key: GEOT-1571
URL: http://jira.codehaus.org/browse/GEOT-1571
Project: GeoTools
Issue Type: Bug
Components: core main
Affects Versions: 2.5-M0, 2.4-RC0, 2.4-RC1, 2.4.0, 2.5-M1, 2.5.0
Environment: all
Reporter: Peter Bolla
Assignee: Jody Garnett
Priority: Minor
Attachments: SubFeatureCollection.java.patch
I had a problem with SubFeatureCollection some month ago. Since then my "fix"
waits uncommitted in my source tree. Now here is the detailed description from
my original mail, followed by Jody's reply, and there is a small patch attached
also.
{quote}
I have a FeatureCollection, from wich I'd like to create a FeatureList.
I try to do it by creating a SubFeatureList, providing Filter.INCLUDE as
Filter, and Sort.NATURAL_ORDER as SortBy.
My problem is, that SubFeatureList's constructor delegates to
SubFeatureCollection's constructor, which throws exception if the filter
parameter is FIlter.INCLUDE. It says that "A subcollection with
Filter.INCLUDE should be a FeatureCollectionEmpty". My question is, what
does this mean? (What is a FeatureCollectionEmpty?)
On the other hand, if I comment out the check for Filter.INCLUDE in
SubFeatureCollection, the SubFilterList works as I expected. So is that
check important for SubFeatureCollection?
(I guess that a SubFeatureCollection with Feature.INCLUDE would be the
same as the collection it is based on. Am I right?)
{quote}
Jody's reply:
{quote}
I think you have found a mistake! I think a programmer (maybe me) got carried
away with code reuse and confused things.
You are correct that a SubFeatureCollection with Feature.INCLUDE should be the
same as the one that came before.
You are on the right way to create a FeatureList ... the code is just letting
you down.
FeatureCollection.sort is supposed to be implemented (and the resulting
FeatureList is very fast for the database based collections). Let me check
DefaultFeatureCollection now.
{quote}
This bug now is only about the SubFeatureCollection and Feature.INCLUDE, not
about sortBy(...).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel