Hi again Jody & all,

based on your hints I have made some progress (implementing a custom
FeatureCollection implementation with Filtering and some other features
based on the examples), but some FeatureImpl-related questions remain:

My main issue concerns the correct creation of FeatureImpls. I created
my SimpleFeatures in a simple ;) way:

target = SimpleFeatureBuilder.build(targetType, new Object[]{},
source.getIdentifier().getID());

Creating a FeatureImpl compared to that:
new FeatureImpl(new HashSet(), targetType, source.getIdentifier());

I assume this is not a good idea, leading me to my second issue...

...the later modification of the FeatureImpls. Is it intended to work
like this (example with setting the geometry)?

GeometryAttribute gattr = target.getDefaultGeometryProperty();
gattr.setValue(sourceGeom);

This doesn't work (since getDefaultGeometryProperty always looks up in
the set of attributes returned by value(), where it's obviously not yet
stored).

>> - Can the Geotools StreamingRenderer also work with FeatureImpl objects?
> 
> Yes; it uses the same property accessor code and expressions as the
> filter implementation.

OK, I just had to use a different method in setting up the MapContext,
because the one using FeatureCollections was fixed to accepting
SimpleFeatures.

Thanks again & cheers,

Thorsten

-- 
Thorsten Reitz

Fraunhofer-Institut für Graphische Datenverarbeitung IGD
[email protected]  |  www.igd.fraunhofer.de

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to