[geos-devel] Minimum Bounding Circle

Bruce Rindahl rindahl at lrcwe.com
Mon Dec 29 14:05:51 EST 2008


I just looked at MinimumDiameter.cpp and the code does the same thing as 
the first part of my code linked by Regina.  This would be nice to have 
except for one thing - it may not work.  It calls distancePerpendicular 
which I couldn't find.  If this finds the point furthest from the 
/extended/ line segment and uses this to compute the diameter it is the 
same method as I used - rotate the geometry so the segment is horizontal 
and compute the bounding box.  I can provide you with a geometry where 
this algorithm fails.  Lee Meilleur can also provide a counter example.  
Because of this I changed my code to test every point pair for the 
Minimum Diameter.
Bruce Rindahl

Martin Davis wrote:
> Yes, this is computing the same thing as the Minimum Bounding Circle 
> algorithm.  This algorithm appeared in JTS for some reason which is 
> lost in the mists of time.  AFAIK it's never really been used or 
> tested extensively.
> It probably postdated the initial port of GEOS, and I guess nobody 
> went looking for it until now...
>
> Obe, Regina wrote:
>>
>> I was snooping around the GEOS library and noticed a curious 
>> algorithm class
>> called MinimumDiameter.  As far as I can tell from scanning the code,
>> it seems similar in concept to the the Minimum Bounding Circle 
>> plpgsql algorithm that
>> Bruce posted in November
>>
>> http://postgis.refractions.net/pipermail/postgis-users/2008-October/021734.html 
>>
>>
>> Just wondering why this is not exposed in the CAPI interface or does 
>> it server an entirely different purpose from what I am thinking.
>>
>> Thanks,
>> Regina
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> *The substance of this message, including any attachments, may be 
>> confidential, legally privileged and/or exempt from disclosure 
>> pursuant to Massachusetts law. It is intended solely for the 
>> addressee. If you received this in error, please contact the sender 
>> and delete the material from any computer. *
>>
>> ------------------------------------------------------------------------
>>
>> * Help make the earth a greener place. If at all possible resist 
>> printing this email and join us in saving paper. *
>>
>> * *
>>
>> * *
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> geos-devel mailing list
>> geos-devel at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geos-devel
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20081229/1f52bc6b/attachment.html


More information about the geos-devel mailing list