On Mon, Aug 20, 2012 at 9:32 AM, Emmanuel Blondel <
[email protected]> wrote:

>  Hello all,
>
> I have developed some code to detect anomalies in a vector layer (overlaps
> & gaps), helping myself with some existing WPS processes of the
> gt-feature-process module, such as IntersectionFeatureCollection..
> I noted that these processes were implemented in a streaming fashion, and
> using a DecoratingSimpleFeatureCollection.
>
> - I would like to know if implementing a process in a streaming fashion
> has an impact in term of performance.
>

That's a pretty general question, so the answer is "it depends on the
process".  Some kinds of processes can be evaluated in streaming fashion
with essentially no impact in performance (e.g. ones like Transform and
Simplify).  Others (like IntersectionFeatureCollection) will see a big
impact in performance compared to an in-memory algorithm.  The reason for
using a streaming algorithm is usually to avoid being limited by memory
size - so there's a trade-off between the size of the dataset that can be
handled, and the expected runtime.  This tradeoff can only be evaluated on
a case-by-case basis.  It might be nice to provide both in-memory and
streaming options for some critical processes.

>
> - The base operation of my process is to input a Polygon Feature
> Collection, and outputs a Point Feature Collection containing the polygon
> vertices, those potentially involved in anomalies (i.e. for each polygon
> feature I will get several points in my output)..
> I have already a piece of code that runs well, but I would like to build a
> WPS process with it & I am wondering if such process could be implemented
> in a streaming fashion as well...
>
> Could somebody give me advice on this?
>

Whether your algorithm can be written in a streaming fashion depends on the
nature of the algorithm.  Many computational geometry algorithms can be
written in a streaming fashion, but sometimes this can be very difficult to
do, and in fact are still being actively researched.   As an example,
Isenburg et al have a clever streaming Delaunay Triangulation algorithm -
but it seems very difficult to implement.

Some CG algorithms are inherently local in nature, and thus are more
amenable to being computed in a streaming fashion.  I suspect the process
of anomaly detection for polygonal coverages is in this category. But
that's not to say that it's easy to develop a streaming algorithm.  There
is generally quite a bit more bookkeeping required, as well as some more
sophisticated data structures (such as a sweepline structure, using some
sort of segment tree).

>
> --
Martin Davis
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to