[postgis-users] Get concave hull from an array of longitude in latitude points

Aleš Kecman ales.kecman at gmail.com
Wed Dec 3 10:36:20 PST 2008


I'm trying to find the easiest way to get the concave polygons. The way of
getting them has to be by using PostgreSQL or it has to be a part of C#
code, because the user will be able to move a lonlat point from one subarea
to another, which means that concave polygons will be generated on demand. I
have read all the ideas posted on this thread and I find the alpha shapes
quite useful, just need to figure it out how to implement this into my C#
code that generates the Google Earth kml files. I'm also quite a beginner in
C# programming.

I attached a text file containing points for new polygon and also two
pictures, first one with convex polygon and second with concave polygon to
see what the output should be.

Thanks for all your answers!


On Wed, Dec 3, 2008 at 6:46 PM, Martin Davis <mbdavis at refractions.net>wrote:

> You might also check out this paper:
>
> http://www.foss4g.org/index.php/foss4g/2008/paper/view/226/157
>
> It uses a "connect-buffer-simplify" approach.
> Martin Davis wrote:
>
>> I think the ideas for the solution have already been posted on this thread
>> - you either need to use alpha shapes or one of the concave hull algorithms.
>>  It sounded like pgrouting has an alpha shapes implementation - that would
>> probably be the easiest way forward.  Implementing the other algorithms
>> would be non-trivial.
>>
>> It might also help if you posted a picture of what you think the desired
>> output should be, for the sample data you posted.
>>
>> Aleš Kecman wrote:
>>
>>> Hi!
>>>
>>> I'm still struggling with this "concave hulls" and it seems I just can't
>>> find the way how to do it. I'm sending a text file with some longitude and
>>> latitude points of selected subarea from which I need to get a concave
>>> polygon. There is only one polygon in attached text file. In my database I
>>> have around 500 000 points from which I need to form around 700 polygons. If
>>> there is a way to do it in PostGis I would really appreciate any help. I
>>> also attached a jpg picture of my convexhull polygon. Thanks!!!
>>>
>>> Greets, Ales.
>>>
>>>
>>>
>>> On Mon, Nov 24, 2008 at 12:13 PM, Mark Cave-Ayland <
>>> mark.cave-ayland at siriusit.co.uk <mailto:mark.cave-ayland at siriusit.co.uk>>
>>> wrote:
>>>
>>>    Aleš Kecman wrote:
>>>
>>>        Hi!
>>>
>>>
>>>        I'm new to Postgis and would really like to get some help on
>>>        getting a concave hull from an array of points.
>>>
>>>        For example:
>>>
>>>        I have an array of points - longitude and latitude of
>>>        buildings in particular area in the city. I already managed to
>>>        get a convex hull polygon from this array of points, but this
>>>        is not really helpful. What I'm trying to get is some kind of
>>>        concave hull polygon from an array of points, which I would
>>>        further like to use in Google Earth kml file.
>>>
>>>        Thanks.
>>>
>>>
>>>
>>>    Hi Aleš,
>>>
>>>    Does ST_Union() help you at all?
>>>
>>>
>>>    ATB,
>>>
>>>    Mark.
>>>
>>>    --     Mark Cave-Ayland
>>>    Sirius Corporation - The Open Source Experts
>>>    http://www.siriusit.co.uk
>>>    T: +44 870 608 0063
>>>    _______________________________________________
>>>    postgis-users mailing list
>>>    postgis-users at postgis.refractions.net
>>>    <mailto:postgis-users at postgis.refractions.net>
>>>    http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>
>>
> --
> Martin Davis
> Senior Technical Architect
> Refractions Research, Inc.
> (250) 383-3022
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081203/7bd8f74b/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Stegne_subarea_houses_points.txt
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081203/7bd8f74b/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Stegne_before.jpg
Type: image/jpeg
Size: 92058 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081203/7bd8f74b/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Stegne_after.jpg
Type: image/jpeg
Size: 89510 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081203/7bd8f74b/attachment-0001.jpg>


More information about the postgis-users mailing list