[postgis-users] Cut off 1-acre of a parcel

John Abraham jabraham at ucalgary.ca
Mon Apr 14 17:10:56 PDT 2008


Hi there.  I'm a fairly new user of PostGIS, but I think I finally have 
it figured out and I'm finding it *very* useful and productive.

Now I'm ready to tackle one of my larger problems.  I'm working with a 
cadastral layer and forecasting future development patterns.  I have a 
need to simulate subdivision, where a large vacant parcel (say, 640 
acres) will realistically be developed in the future in smaller chunks 
(say, 1 acre).  Right now I ignore the spatial part of it, and end up 
having multiple future "pseudo-parcels" associated with one current-year 
parcel.  So, for instance, if the simulation has two 1-acre development 
events in year 2010 and one 1-acre development event in year 2012, all 
occurring on the same original 640 acre parcel, then in year 2013 I have 
4 records associated with the original 640 acre parcel: a 637 acre 
record that is still vacant, and three 1 acre records representing the 
development that has occurred.  All four of these records are still 
associated with the same polygon.

For the general predictive power of the model and for the mathematics 
behind it, this is ok, at least for now.  But for visualization, this 
isn't ok.  For visualization, I'd like a separate (non-overlapping) 
polygon for each of these records.  I need an algorithm that takes off 
an arbitrary 1acre chunk of the large parcel each time a development 
event is simulated for it.

The algorithm I'd like to use (unless someone suggests a better one) is.
1) find the east edge of the bounding box for the polygon.
2) draw a north-south line that is sqrt(43560) ft to the west of the 
east edge of the bounding box, and consider the areas on either side.
3) if the area on the east of the line is less than 1-acre, move the 
line west until the area on the east of the line is exactly one acre, 
done (stop).
4) else, draw an east-west line through the polygon far enough south so 
that the area north-east of the intersection of the two lines is exactly 
1 acre.

I'm pretty sure this algorithm will grab 1-acre chunks of the original 
parcel starting in the north-east, and working down the east side, and 
when the east side is completely separated, it will start again at the 
new north-east corner and work down that side.   So the parcel will be 
slowly "subdivided" as development occurs from the east to the west in 
strips.  Since there are 43560 sqft in an acre, most of the chunks will 
be square.  (If the original polygon is non-convex, then the subdivided 
pieces may end up being multi-polygons, but that's ok, I can deal with 
multi-polygons, so long as the subdivision algorithm can handle it.  
There will also be some rather long-and-thin slivers, I think; it would 
actually be better to spiral around the parcel, working towards the 
inside in a circle, instead of always coming from the east side.  But... 
I think this algorithm will work, and once it's working I can "tweak" it 
later.)

Can anyone give me some pointers as to how to code this up in PostGIS?  
I have a few clues as to how to draw a line sqrt(43560) ft from the east 
side, but I don't have any clues about how to draw a line "far enough 
south so that the resulting area is exactly 1 acre".  I could try some 
sort of trial-and-error bisection algorithm, I suppose, but I expect 
there might be a much easier way.

Any and all comments appreciated, thanks

--
John Abraham
jabraham at ucalgary.ca




More information about the postgis-users mailing list