Jody, the code i appended on Jan,23rd shows only the basic ideas but was not 
compileable against version 2.5.2 of geotools! Sorry for that, hopefully I 
didn't wasted your time!<?xml:namespace prefix = o ns = 
"urn:schemas-microsoft-com:office:office" /><o:p></o:p>

Currently i try to get the code adapted but got some problems with generics. 
<o:p></o:p>

The FeatureCollection has generic types (FeatureCollection <? extends 
FeatureType, ? extends Feature>) but the AbstractDataStore does not work with 
generics (e.g. getSchema() and getFeatureReader() etc.). Are there any plans to 
harmonize this? Will getools support only SimpleFeatuteTypes in the 
future?<o:p></o:p>

I guess the MemoryFeatureCollection is not the right one I should use. I 
figured out that the CollectionDataStore in combination with the 
DefaultFeatureCollection fits much more. But with the same problems i posted 
before (Empty Collection at time of adding the FeatureSource to the 
MapContext.<o:p></o:p>

I think we should extend the Constructor. The collection could be empty and the 
DataStore is well defined.<o:p></o:p>

 /**
 * Builds a data store wrapper on top of a feature collection
 *
 * @param collection
 */
 public CollectionDataStore(SimpleFeatureType featureType, 
FeatureCollection<SimpleFeatureType, SimpleFeature> collection) {
 this.collection = collection;
 this.featureType = featureType;

 collection.addListener(new FeatureCollectionListener());
 }<o:p></o:p>

The FeatureCollections implementations are different in behavior for the 
getBounds method. In on a referenced envelope is created and with a Iterator 
the bound got recalclated. In an other the ReferenceEnvelope was created using 
the featureType CRS information an some return null. I would prefere later. 
Collections should return the same expected result. <o:p></o:p>

- If the FeatureCollection is not empty the getBound should iterate over all 
Features<o:p></o:p>

- If there is an empty collection it should return the CRS relevant Envelope. 
<o:p></o:p>

- If CRS information is not available (null) a ReferencedEnvelope should 
returned <o:p></o:p>

- but getBounds returns never null.<o:p></o:p>

What do you think?<o:p></o:p>

 Frank<o:p></o:p>


        
Deutschlands größte Online-Videothek schenkt Ihnen 12.000 Videos!* 
*http://entertainment.web.de/de/entertainment/maxdome/index.html* 
[http://entertainment.web.de/de/entertainment/maxdome/index.html]
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to