[gdal-dev] How to utilize the new GEOS functions of Spatialite 5.1.0?

Even Rouault even.rouault at spatialys.com
Mon Aug 7 16:49:08 PDT 2023


Jukka,

I believe this is a OSGeo4W specific build issue that doesn't activate 
functionalities of GEOS >= 3.10. I've proposed a potential fix in 
https://github.com/jef-n/OSGeo4W/pull/17

Even

Le 08/08/2023 à 00:55, Rahkonen Jukka a écrit :
>
> 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-
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20230808/d2e9c7ce/attachment-0001.htm>


More information about the gdal-dev mailing list