[gdal-dev] OGR SQL CAST geometry example

Even Rouault even.rouault at spatialys.com
Thu May 30 16:09:43 PDT 2024


Dan,

you can't do operations on geometries with OGR SQL, but selecting it. 
You'd typically need to use the ST_PointN() from Spatialite with the 
SQLite dialect

Even

Le 31/05/2024 à 00:32, Dan Jacobson via gdal-dev a écrit :
> Hi. I will add an example to
> https://gdal.org/user/ogr_sql_dialect.html#changing-the-type-of-the-fields
> showing users how to e.g., CAST LINESTRING Z to POINTS Z, e.g.,
> to extract the points from:
> $ ogrinfo 0.lines.kml -q -sql 'SELECT "_ogr_geometry_" FROM "0"'
> Layer name: 0
> OGRFeature(0):1
>    LINESTRING Z (-100.790056666679 36.3802233333333 1000,-100...
> Alas, there are no examples I can find of how to write it.
>
> _______________________________________________
> 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.



More information about the gdal-dev mailing list