[postgis-tickets] [PostGIS] #3083: Add ST_MinimumDiameter() from GEOS
PostGIS
trac at osgeo.org
Tue Mar 17 16:47:57 PDT 2015
#3083: Add ST_MinimumDiameter() from GEOS
-------------------------+--------------------------------------------------
Reporter: sfkeller | Owner: pramsey
Type: enhancement | Status: new
Priority: low | Milestone:
Component: postgis | Version: 2.1.x
Keywords: |
-------------------------+--------------------------------------------------
Comment(by robe):
Bruce and I asked this about 6 years ago before Bruce created
ST_MinimumBoundingCircle as he thought it would be useful for building
ST_MinimumBoundingCircle.
Martin responded. Here is the thread:
http://lists.osgeo.org/pipermail/geos-devel/2009-January/003861.html
and key elements of it:
----
> Bruce Rindahl wrote:
> > 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
> >>>
----
Anyway there is a reason we didn't expose it, not sure if that reason is
still relevant:
strk you know if this function is still broken?
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/3083#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list