I had a go at doing this with JTS a few years ago and there is some code in
this archive post:
http://lists.refractions.net/pipermail/jts-devel/2008-December/002763.html
I'm sure it is very inefficient and it was only ever used in a limited
domain so beware of edge cases.
There are plenty of references on the topic such as this one:
https://www.cise.ufl.edu/~sahni/papers/part.pdf
And here is some javascript code which might be a useful starting point:
https://www.npmjs.org/package/rectangle-decomposition
Hope that helps.
Michael
On 10 December 2014 at 05:25, sstein <[email protected]> wrote:
> i general, you could use a concave hull algorithm (there is on by Eric
> Grosso : rotefabrik.fr?) - but then you are still left to parameter
> tuning...
>
>
>
> my 2 cents
>
> syefan
>
>
> ------ Originalnachricht ------
> *Von: *Shahak Nagiel
> *Datum: *09.12.2014 13:17
> *An: *[email protected];
> *Betreff:*[Jts-topo-suite-user] Rectangular-ize a geometry
>
> I have some arbitrary collection of Envelopes (or rectangular Polygons)
> which are often clustered together (adjacent to one another). I need to
> find some way to extract the coarser-grained (larger) rectangles which
> comprise the overall shape.
>
> For example, think of an "L"-shaped polygon, comprised of a number of
> smaller geometries (something like
> http://www.nctm.org/uploadedImages/About_NCTM/President/Problem_to_Ponder/2011_0915_PTP_Figure2.jpg).
> The end result (output) would be N envelopes/polygons that--merged
> together--represent the original geometry.
>
> Step one--merging--is simple (CascadedPolygonUnion). But how then to
> split them apart? Maybe the right approach is to avoid merging them at
> first and try instead to build the envelopes serially?
>
>
> [image: image]
>
> <http://www.nctm.org/uploadedImages/About_NCTM/President/Problem_to_Ponder/2011_0915_PTP_Figure2.jpg>
>
>
>
>
>
>
>
>
> <http://www.nctm.org/uploadedImages/About_NCTM/President/Problem_to_Ponder/2011_0915_PTP_Figure2.jpg>View
> on
> <http://www.nctm.org/uploadedImages/About_NCTM/President/Problem_to_Ponder/2011_0915_PTP_Figure2.jpg>
> www.nctm.org
> <http://www.nctm.org/uploadedImages/About_NCTM/President/Problem_to_Ponder/2011_0915_PTP_Figure2.jpg>
> <http://www.nctm.org/uploadedImages/About_NCTM/President/Problem_to_Ponder/2011_0915_PTP_Figure2.jpg>
> Preview by Yahoo
>
>
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Jts-topo-suite-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user