[OSGeo-Discuss] open source polygon cluster aggregation algorithm?

G. Allegri giohappy at gmail.com
Wed May 12 02:13:51 PDT 2010


I have to work with plsql, the jts have the right algorithm so I've
decided to try it out: wrap the jts inside java stored procedures. It
hasn't been straigthforward but it works. Thanks for the hint Mike.
Fortunatly gt oracle-spatial plugin has some code to map
oracle.sql.STRUCT to JTS geometry, so I've extrapolated the needed
classes only, because it was too much to load the whole gt classes in
Oracle!

giovanni

2010/5/10 Mike Toews <mwtoews at gmail.com>:
> The recent JTS has a nice buffering options, namely the mitre buffer.
> It does not have rounded corners, and has been very useful to me
> (i.e., we can physically survey-out the buffer on the ground with
> fewer points to locate and stake out).
> http://lin-ear-th-inking.blogspot.com/2007/12/new-buffer-styles-in-jts-19.html
>
> Although I'm no expert at plsql, it appears it can be extended with
> java, so maybe it could be possible to wrap the Oracle WKT/B(?)
> through JTS:
> http://www.devshed.com/c/a/Oracle/Extending-PLSQL-with-Java-Libraries/
>
> Someone must have done this for plsql in the past ...
>
> -Mike
>
> On 9 May 2010 06:01, G. Allegri <giohappy at gmail.com> wrote:
>> Hi Stefan. You guessed right, it's buildings generalization. I know
>> jts and geos quite well but unfortunatly I  can't use them because I'm
>> working directly on oracle with plsql. I think buffer is the way, but
>> not the one oracle provides because it rounds the corners...
>>
>> Bye,
>> Giovanni
>>
>> 2010/5/7 Stefan Steiniger <sstein at geo.uzh.ch>:
>>> how about using R it has alpha shapes and a-like?
>>>
>>> What you describe sounds like a problem in map generalization. I.e. the
>>> approach of buffering is something what a colleague of mine once implemented
>>> to generalize house-blocks for maps (aggregate the single buildings).
>>> Unfortunately I don't know of any accessible code for that.
>>>
>>> If you are proficient in Java or C++ you could make you custom
>>> implementation with JTS or Geos (sounds easy to me).
>>>
>>> on what geographic objects are you working on? and how much does the shape
>>> to be need to maintained?
>>>
>>> stefan
>>>
>>> G. Allegri wrote:
>>>>
>>>> <Aside>
>>>> A nice implementation of alpha shapes with jts:
>>>> http://www.mail-archive.com/jts-devel@lists.jump-project.org/msg01019.html
>>>> </Aside>
>>>>
>>>> 2010/5/6 G. Allegri <giohappy at gmail.com>:
>>>>>
>>>>> Thanks Andrea for the links. Yes, I think the problem is similar, in
>>>>> fact I was also looking for concave hull and alpha shapes algoithms,
>>>>> but the only open solution I've found is from CGAL [1] and... it's too
>>>>> complex to extract and reimplement in my context (database procedural
>>>>> programming).
>>>>>
>>>>> IWe have implemented something very "rude":
>>>>>
>>>>> 1 - logically aggregate polyongs in clusters (given a certain distance)
>>>>> 2 - buffer each polygon mantaining the shape (not the usual buffer,
>>>>> which make rounded artifacts)
>>>>> 3 - geometrical union
>>>>> 4 - shrink the result (unbuffer)
>>>>>
>>>>> But I have the time for a long holiday waiting the end of the process :)
>>>>>
>>>>> [1]
>>>>> http://www.cgal.org/Manual/last/doc_html/cgal_manual/Alpha_shapes_2/Chapter_main.html
>>>>>
>>>>> 2010/5/6 Andrea Aime <aaime at opengeo.org>:
>>>>>>
>>>>>> G. Allegri ha scritto:
>>>>>>>
>>>>>>> I'm looking for an algorithm to do polygon cluster aggregation,
>>>>>>> similar to the ArcInfo "Aggregate Polygon" [1].
>>>>>>> I know about GEOS "Cascaded Union", but I need two more features:
>>>>>>>
>>>>>>> 1 - clustering of polygons that fall within a a certain threshold
>>>>>>> distance from each other
>>>>>>> 2 - mantain orthogonality, i.e. the original angles/shapes
>>>>>>
>>>>>> I don't know of any such implementation, but it looks somewhat
>>>>>> similar to the computation of a concave hull:
>>>>>>
>>>>>> http://ubicomp.algoritmi.uminho.pt/local/concavehull.html
>>>>>>
>>>>>> http://stackoverflow.com/questions/83593/is-there-an-efficient-algorithm-to-generate-a-2d-concave-hull
>>>>>>
>>>>>> Cheers
>>>>>> Andrea
>>>>>>
>>>>>> --
>>>>>> Andrea Aime
>>>>>> OpenGeo - http://opengeo.org
>>>>>> Expert service straight from the developers.
>>>>>> _______________________________________________
>>>>>> Discuss mailing list
>>>>>> Discuss at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/discuss
>>>>>>
>>>> _______________________________________________
>>>> Discuss mailing list
>>>> Discuss at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/discuss
>>>>
>>>>
>>> _______________________________________________
>>> Discuss mailing list
>>> Discuss at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/discuss
>>>
>> _______________________________________________
>> Discuss mailing list
>> Discuss at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/discuss
>>
> _______________________________________________
> Discuss mailing list
> Discuss at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/discuss
>



More information about the Discuss mailing list