<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: [geos-devel] Minimum Bounding Circle</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I'm probably not the best person to answer this but based on my understanding.<BR>
<BR>
I think you -<BR>
1) Expose it in GEOS -- capi/geos_c.cpp, .h<BR>
2) Then on the PostGIS side create a function in lwgeom/lwgeom_geos.* that<BR>
calls the CAPI function.<BR>
<BR>
Hope that helps,<BR>
Regina<BR>
-----Original Message-----<BR>
From: geos-devel-bounces@lists.osgeo.org on behalf of Bruce Rindahl<BR>
Sent: Tue 1/13/2009 1:21 PM<BR>
To: rindahl@lrcwe.com; GEOS Development List<BR>
Cc: Lee Meilleur<BR>
Subject: Re: [geos-devel] Minimum Bounding Circle<BR>
<BR>
I am interested in exploring this issue further. I believe the the<BR>
computation of a minimum bounding circle is a requirement in evaluating<BR>
congressional districts (Lee- Reference??). If so then to have this<BR>
function available to a program like PostGIS would be a plus. I would<BR>
like to test this module but need some help. How do I expose the<BR>
module so it is available in PostGIS?<BR>
<BR>
Bruce<BR>
<BR>
Bruce Rindahl wrote:<BR>
> I just looked at MinimumDiameter.cpp and the code does the same thing<BR>
> as the first part of my code linked by Regina. This would be nice to<BR>
> have except for one thing - it may not work. It calls<BR>
> distancePerpendicular which I couldn't find. If this finds the point<BR>
> furthest from the /extended/ line segment and uses this to compute the<BR>
> diameter it is the same method as I used - rotate the geometry so the<BR>
> segment is horizontal and compute the bounding box. I can provide you<BR>
> with a geometry where this algorithm fails. Lee Meilleur can also<BR>
> provide a counter example. Because of this I changed my code to test<BR>
> every point pair for the Minimum Diameter.<BR>
> Bruce Rindahl<BR>
><BR>
> Martin Davis wrote:<BR>
>> Yes, this is computing the same thing as the Minimum Bounding Circle<BR>
>> algorithm. This algorithm appeared in JTS for some reason which is<BR>
>> lost in the mists of time. AFAIK it's never really been used or<BR>
>> tested extensively.<BR>
>> It probably postdated the initial port of GEOS, and I guess nobody<BR>
>> went looking for it until now...<BR>
>><BR>
>> Obe, Regina wrote:<BR>
>>><BR>
>>> I was snooping around the GEOS library and noticed a curious<BR>
>>> algorithm class<BR>
>>> called MinimumDiameter. As far as I can tell from scanning the code,<BR>
>>> it seems similar in concept to the the Minimum Bounding Circle<BR>
>>> plpgsql algorithm that<BR>
>>> Bruce posted in November<BR>
>>><BR>
>>> <A HREF="http://postgis.refractions.net/pipermail/postgis-users/2008-October/021734.html">http://postgis.refractions.net/pipermail/postgis-users/2008-October/021734.html</A><BR>
>>><BR>
>>><BR>
>>> Just wondering why this is not exposed in the CAPI interface or does<BR>
>>> it server an entirely different purpose from what I am thinking.<BR>
>>><BR>
>>> Thanks,<BR>
>>> Regina<BR>
>>><BR>
>>><BR>
>>><BR>
>>><BR>
>>><BR>
>>> ------------------------------------------------------------------------<BR>
>>><BR>
>>><BR>
>>> *The substance of this message, including any attachments, may be<BR>
>>> confidential, legally privileged and/or exempt from disclosure<BR>
>>> pursuant to Massachusetts law. It is intended solely for the<BR>
>>> addressee. If you received this in error, please contact the sender<BR>
>>> and delete the material from any computer. *<BR>
>>><BR>
>>> ------------------------------------------------------------------------<BR>
>>><BR>
>>><BR>
>>> * Help make the earth a greener place. If at all possible resist<BR>
>>> printing this email and join us in saving paper. *<BR>
>>><BR>
>>> * *<BR>
>>><BR>
>>> * *<BR>
>>><BR>
>>> ------------------------------------------------------------------------<BR>
>>><BR>
>>><BR>
>>> _______________________________________________<BR>
>>> geos-devel mailing list<BR>
>>> geos-devel@lists.osgeo.org<BR>
>>> <A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
>><BR>
><BR>
> ------------------------------------------------------------------------<BR>
><BR>
> _______________________________________________<BR>
> geos-devel mailing list<BR>
> geos-devel@lists.osgeo.org<BR>
> <A HREF="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</A><BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>