[postgis-devel] New function ST_MinimumDiameter() ?
Rémi Cura
remi.cura at gmail.com
Mon Feb 9 04:03:19 PST 2015
Hey,
I looked into it a few month ago.
Here is a working solution in plpgsql, designed to be fast to code (and
slow to execute :-/)
https://github.com/Remi-C/PPPP_utilities/blob/6e9e8524812961b013b899466fe833dfa5d926e9/postgis/rc_oriented_bbox_deom_axis.sql
Depending on your need, it may suffice.
Cheers,
Rémi-C
2015-02-09 10:01 GMT+01:00 Stefan Keller <sfkeller at gmail.com>:
> Hallo Niklas
>
> It's really the Oriented Bounding Box (OBB) I'm after.
> I'd like to label e.g. buildings or lakes alongside their longest
> extension.
>
> -S.
>
>
> 2015-02-08 22:12 GMT+01:00 Nicklas Avén <nicklas.aven at jordogskog.no>:
> > Hallo Stefan
> >
> > Isn't MinimumBOundingCircle usable?
> > http://postgis.net/docs/manual-dev/ST_MinimumBoundingCircle.html
> > I guess that comes from the same function in Geos.
> >
> > From that you can get the diameter by just use
> > ST_XMax(circle)-ST_XMin(circle)
> >
> > Or do I misunderstand?
> >
> > /Nicklas
> >
> >
> > On Sun, 2015-02-08 at 20:44 +0100, Stefan Keller wrote:
> >> Hi Regina and Paul
> >>
> >> I'd like to use function ST_MinimumDiameter() in PostGIS which
> >> obviously is not yet ported from GEOS.
> >> Are there potentially other nice functions like this, which could be
> >> made available in PostGIS?
> >> Should I try to make a list?
> >>
> >> Yours, S.
> >>
> >> 2015-02-06 21:34 GMT+01:00 Stefan Keller <sfkeller at gmail.com>:
> >> > Hi,
> >> >
> >> > While asking about how to calculate the Oriented Bounding Box (OBB) of
> >> > a polygon or point set [1] I realized that there exists a function
> >> > MinimumDiameter() in GEOS [2].
> >> > Now, I'm wondering how to integrate this into PostGIS.
> >> > Unfortunately I'm not a C programmer and i don't how to the process
> >> > goes for new features in PostGIS.
> >> > Can somebody help?
> >> >
> >> > Yours, S.
> >> >
> >> > [1]
> http://gis.stackexchange.com/questions/133327/how-to-calculate-the-oriented-bounding-box-obb-of-a-polygon-or-point-set
> >> > [2]
> http://geos.refractions.net/ro/doxygen_docs/html/classgeos_1_1algorithm_1_1MinimumDiameter.html
> >> _______________________________________________
> >> postgis-devel mailing list
> >> postgis-devel at lists.osgeo.org
> >> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
> >>
> >
> >
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150209/0d977546/attachment.html>
More information about the postgis-devel
mailing list