Hi Mart,

 

yes it is computational expensive compared ti raster operations - i would say. And it depends on how you programmed it. So, how about generating all buffers with JTS first and then later calculating the difference from the buffer rastetized (each buffer = one raster)...  which woul require you to a) use other tools than JTS too (eg sextante) b) decide on cellsize/accuracy, c) rasterization will take time too. But combining rsster + vector may be worth a test.

 

cheers

stefan

 

------ Originalnachricht ------
Von: Mart
Datum: 11.11.2014 23:52
An: [email protected];
Betreff:[Jts-topo-suite-user] Geometry.difference performance problem

Hi all,
 
I'm working on a project where I need to iteratively buffer a source geometry, clip it to another very complex geometry, and produce a series of geometries representing the difference between each iteration. It is simulating flow of water through a stream network.
 
The only way I can think of to produce each band is to use currentGeometry.difference(previousGeometry).
 
This works ok but 99% of the processing time is taken up doing the difference calculations.
 
Considering there is typically only a very small difference between currentGeometry and previousGeometry I'm wondering whether there is a more efficient way of calculating the difference.
 
I suspect the performance problem might be something to do with garbage collection as it typically processes 1-4 iterations very quickly, then spends a couple of minutes caught on a call to the difference method. A couple of minutes on garbage collection seems a bit excessive but it's got a 30GB heap. Are there known issues with the performance of difference or is it just a notoriously inefficient operation to perform?
 
Thanks for any insight.
Mart
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user

Reply via email to