On Mon, Nov 26, 2012 at 1:47 AM, Martin Logan
<[email protected]>wrote:

> Hi Justin,
>
> Thanks for the pointer. I investigated at replacing my block of code with
> something that uses the StreamingParser but stumbled into the issue again
> that I needed the whole FeatureCollection to be built as I had to provide
> it as an input to FeatureJSON.writeFeatureCollection(). I found that
> building the FeatureCollection using the StreamingParser has the same cost
> as using just the plain Parser as every feature had to be stored into
> memory all at one go.
>
> My follow up question is if you know a FeatureCollection implementation
> that streams Features one at a time. Something that probably takes in a
> StreamingParser instance and calls parser.parse() for each iterator.next()
> call to grab the features inside the FeatureCollection object. I had a
> quick look around the codebase but didn't see anything.
>
>
I believe you'll have to implement your own, but it should not be too hard.
On trunk (the 9.x series) AbstractFeatureCollection can be extended by
providing little more than a FeatureIterator,
on the stable series it's similar, but uglier, and you have to provide an
Iterator instead

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to