<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
OK I can kill this thread...<br>
This issue came up when a request to generate the MINIMUM Bounding
Circle of a geometry. To generate this you need the MAXIMUM diameter
of a geometry as a start. Note the opposite operations. The bottom
line is there is no MaximumDiameter function in GEOS (or probably
JTS). If the MinimumDiameter function is need that could be exposed
but I don't need it.<br>
As for my other comment that the algorithm may fail, that appears to be
wrong since I was confused by the maximum/minimum issue. It looks fine
for what it is doing.<br>
Sorry for all the traffic.<br>
<br>
Bruce Rindahl<br>
<br>
Obe, Regina wrote:
<blockquote
cite="mid:53F9CF533E1AA14EA1F8C5C08ABC08D204D7F0FA@ZDND.DND.boston.cob"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator"
content="MS Exchange Server version 6.5.7653.38">
<title>RE: [geos-devel] Minimum Bounding Circle</title>
<!-- 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: <a class="moz-txt-link-abbreviated" href="mailto:geos-devel-bounces@lists.osgeo.org">geos-devel-bounces@lists.osgeo.org</a> on behalf of Bruce Rindahl<br>
Sent: Tue 1/13/2009 1:21 PM<br>
To: <a class="moz-txt-link-abbreviated" href="mailto:rindahl@lrcwe.com">rindahl@lrcwe.com</a>; 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 moz-do-not-send="true"
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>
>>> <a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
>>> <a moz-do-not-send="true"
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>
> <a class="moz-txt-link-abbreviated" href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/geos-devel">http://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
<br>
<br>
</font>
</p>
</blockquote>
<br>
</body>
</html>