[gdal-dev] How to utilize the new GEOS functions of Spatialite 5.1.0?
Rahkonen Jukka
jukka.rahkonen at maanmittauslaitos.fi
Mon Aug 7 15:55:18 PDT 2023
Hi,
The new Spatialite version has a bunch of new GEOS based functions
* GEOSMinimumRotatedRectangle aka ST_OrientedEnvelope
* GEOSMaximumInscribedCircle
* GEOSMinimumBoundingCircle
* GEOSMinimumBoundingRadius
* GEOSMinimumBoundingCenter
* GEOSLargestEmptyCircle
* GEOSMinimumWidth
* GEOSMinimumClearance
* GEOSMinimumClearanceLine
* GeosDensify
* GeosMakeValid
* ReducePrecision
* HilbertCode
* GeosConcaveHull
I installed gdal-dev version with OSGeo4W and I can see that it is having Spatialite 5.1.0 and GEOS 3.12.0-CAPI-1.18.0. I suppose that the new functions should now work with commands like this, but I get an error instead:
ogrinfo polygon.gpkg -sql "select GEOSMaximumInscribedCircle(geom,1000) from polygon" -dialect SQLite
INFO: Open of `polygon.gpkg'
using driver `GPKG' successful.
ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(select GEOSMaximumInscribedCircle(geom,1000) from polygon):
no such function: GEOSMaximumInscribedCircle
I confirmed with the spatialite 5.1.0 Windows binary that this query works:
SELECT ST_AsText(GEOSMaximumInscribedCircle(ST_GeomFromText('POLYGON ((40 180, 110 160, 180 180, 180 120, 140 90, 160 40, 80 10, 70 40, 20 50, 40 180),(60 140, 50 90, 90 140, 60 140))'),10000));
LINESTRING(100 95, 71.95122 117.439024)
However, some functions like GEOSMinimumClearance seem to work.
-Jukka Rahkonen-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230807/c1e26ce1/attachment.htm>
More information about the gdal-dev
mailing list