[postgis-tickets] [PostGIS] #5373: Expose GEOSLargestEmptyCircle
PostGIS
trac at osgeo.org
Wed Apr 19 15:28:47 PDT 2023
#5373: Expose GEOSLargestEmptyCircle
-------------------------+---------------------------
Reporter: mdavis | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS 3.3.3
Component: postgis | Version: 3.3.x
Keywords: |
-------------------------+---------------------------
GEOS has recently [https://github.com/libgeos/geos/pull/859 enhanced]
`LargestEmptyCircle` so that it works correctly with polygonal boundaries.
See the [https://github.com/locationtech/jts/pull/973 JTS PR] for more
information. It would be nice to expose this in PostGIS.
Currently the LEC functionality is accessed via
`ST_MaximumInscribedCircle` when the input is non-polygonal (lines and/or
points). I suggest exposing it directly via a new function
`ST_LargestEmptyCircle(geom, boundary, tolerance)`. This has the
advantages:
* it provides an explicit boundary constraint polygon. This will support
queries such as "Find the furthest point in a jurisdiction from all
roads".
* it will allow polygonal obstacles (in the future, once the underlying
algorithm is enhanced)
* it allows more focussed documentation and examples
The boundary is optional; if not provided the convex hull of the obstacles
is used. Perhaps the function signature should allow the `boundary`
parameter to be optional? Or else it can be allowed to be NULL.
The existing `ST_MaximumInscribedCircle` behaviour can be left unchanged
for backwards compatibility.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5373>
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