Hello Andrew,

Nice question :-)

I'm not sure that I understand exactly what you're after. In your
example with two adjoining polygons, do you want to keep their common
border unchanged and only move vertices on other parts of each
polygon's exterior ?

My first thought would be to reach for a standard java AffineTransform
to do that, set up to scale the polygon area as required. I can
imagine there are lots of fiddly bits that will crop up though !
Expanding or reducing an isolated polygon is easy - just standardize
the vertex coords by taking the polygon centroid as (0,0) and multiply
them by the desired factor.  The common boundary bit is an interesting
complication though.

Perhaps there is some way of treating the non-common border component
of each polygon as an elastic cable... for instance, by iteratively
moving each vertex towards (decreasing area) or away from (increasing
area) the centroid of the polygon and monitoring the change in polygon
area. Mmm... even as I type that it's starting to sound unnecessarily
complicated.

One thing you might not know is that GeoTools relies on another
library for it's geometry classes and operations: JTS (Java Topology
Suite).  There is a JTS discussion list where people are very
friendly: if you haven't already I'd recommend posting the same
question there to double your chances of getting a useful answer.

You can search the archive of the JTS list here:
http://n2.nabble.com/jts-devel-f219725.html

And join the list to post on it here:
http://lists.refractions.net/mailman/listinfo/jts-devel

(Don't be put off by the list description being about JTS development
- it's a general discussion list as well).

Michael

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to