Yeah I guess that would be easy to do, but as i said, I don't think we /want/ all features to be loaded in memory at once. I was looking at a different option, but need to threat a FeatureCollection as a Collection for that. I was wondering why it was chosen not to derive the interface of FeatureCollection from the general Collection interface in java, as it implements all the same methods. Because a Feature Collection is not a Collection, I am making a Collection wrapper for a FeatureCollection, and also wondering if that maybe already exists somewhere? Seems like an obvious thing.

On 24/01/11 12:50, Jody Garnett wrote:
That is fine; have a look at one of the other implementations of accepts - you can make an implementation that is based around your iterator(). It ends up being a for loop that calls the visitor each time through the loop; on each feature in turn.

Jody

--
Jody Garnett
Sent with Sparrow <http://www.sparrowmailapp.com>

On Monday, 24 January 2011 at 12:58 PM, Niels wrote:

On 22/01/11 07:39, Jody Garnett wrote:
On 21/01/2011, at 5:01 PM, Niels wrote:

I succeeded in getting wms:getFeatureInfo produce GML3 output from complex 
features (Yay!).

However, I am now working on using HTML templates with getFeatureInfo.

I noticed in the code that processes templates, that it loads all features in 
memory first.
However, it uses operations in the FeatureCollection that are not supported by 
MappingFeatureCollection in app-schema.

What operations in FeatureCollection are not supported by 
MappingFeatureCollection? Perhaps you want to take this to the geotools list if 
it is a problem to be worked out?
But yeah; there should be no call to load everything at once; but even if the 
code does do that - it should not effect your implementation of 
FetaureCollection.

Jody

There is a whole series of methods not supported in MappingFeatureCollection: anything that modifies the list (add, clear, etc.) but the one used in the template code is "accepts" to support visitors that visit all features. I think the reason is that a MappingFeatureCollection doesn't actually hold any features, the features are only created when you use the iterator.

I don't know if this should or can be worked out, because loading a whole collection of complex features in memory just doesn't sound like a good idea...

--
*Niels Charlier*

Software Engineer
CSIRO Earth Science and Resource Engineering
Phone: +61 8 6436 8914

Australian Resources Research Centre
26 Dick Perry Avenue, Kensington WA 6151



--
*Niels Charlier*

Software Engineer
CSIRO Earth Science and Resource Engineering
Phone: +61 8 6436 8914

Australian Resources Research Centre
26 Dick Perry Avenue, Kensington WA 6151
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to