[gdal-dev] negative buffer

Dan Putler dan.putler at sauder.ubc.ca
Tue Sep 9 13:27:32 EDT 2008


Hi Bruce,

Could you give a sense of what you want to cluster and what your
objective is with respect to the use of the clustering results? There
are a lot of clustering methods out there, so knowing a bit about what
you want to accomplish would help.

Dan

On Tue, 2008-09-09 at 11:13 -0400, Clay, Bruce wrote:
> I am trying to use GDAL to cluster a group of points.  I am creating a
> buffer around the points then testing buffered points for
> intersection.  I am putting those that intersect into a
> GeometryCollection then creating a convexHull to smooth the polygon.
> 
>  
> 
> All of that works ok but the problem is that the resultant polygon is
> larger than is desired because of the buffer used to create the
> intersections.
> 
>  
> 
> I tried to use a negative value with the Geometry Buffer method to
> shrink the polygon back down to the proper size but Buffer always
> returns a NULL pointer.  I stepped down into the call and it looks
> like GEOS is returning a valid geometry but OGR rejects the polygon do
> to the number of points being too low.  The initial buffer size is 1.5
> Km so smallest cluster has a minimum spatial diameter of 3 km.  I saw
> point counts in the debugger of over 2000 so I am not sure why OGR
> appears to reject the geometry that GEOS passed back.  I don’t have
> GEOS compiled with debug turned on so I could not step into that
> 
>  
> 
> Is there another way to reduce the size of a polygon or a smarter war
> to cluster points?
> 
>  
> 
> Bruce
> 
>  
> 
>  
> 
>  
> 
> 
> 
> This message and any enclosures are intended only for the addressee.  Please  
> notify the sender by email if you are not the intended recipient.  If you are  
> not the intended recipient, you may not use, copy, disclose, or distribute this  
> message or its contents or enclosures to any other person and any such actions  
> may be unlawful.  Ball reserves the right to monitor and review all messages  
> and enclosures sent to or from this email address.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
-- 
Dan Putler
Sauder School of Business
University of British Columbia



More information about the gdal-dev mailing list