Hi Martin,

The following is a general algorithm query rather than a specific JTS
question - hope that's ok.

I have a set of polygons which represent urban areas within a
fire-prone landscape. There are about 5000 polygons varying widely in
area, spatial extent, number of vertices and boundary complexity.

I have the task of creating a regular grid of sample points within the
surrounding landscape and, for each point, determining the distance to
the nearest polygon within each of eight compass segments (ie. N to
NE, NE to E...).  The results only need to be expressed as categorized
values based on a small number of distance cut-points.

I've been trying to nut out something other than a brute force
approach to this without much success so far. One of the possibly less
brutish approaches I've thought of involves the following:

1. Split up the urban polygons by intersecting them with a regular
lattice, create PreparedGeometry objects for the resulting parts and
put them into an STRtree.

2. Construct a sampling template made up of polygons representing the
compass segments, each split according to the distance cut-points
(looking a bit like a dart board), possibly using a custom
CoordinateSequence to have vertex coordinates calculated on the fly
based on the centre coordinate.

3. For each sample point location:
     For each compass segment:
       For inner to outer segment part:
         Query the spatial index with the segment part envelope
         and, if any urban polygons are returned, test for
         intersection.

I'm sure there must be a better way.  Any suggestions or comments will
be gratefully accepted.

Michael

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&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