Alas, even for MULTIPOINT, as there are no facilities for extracting
from aggregates, not even ST_Dump, in the end all one can do is
$ ogrinfo 0.lines.kml -al | perl -nwle \
'if(/LINESTRING.*\((.*)\)/){print for split /,/, $1}'
-100.79005679 36.38022 1000
-100.79008013 36.38531 1
$ ogrinfo 0.lines.kml -q -dialect SQLITE -sql \
'SELECT ST_PointN(GEOMETRY, generate_series(1, ST_NPoints(GEOMETRY))) FROM "0"'
ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(
no such function: generate_series
___
gdal-dev mailing list
gdal-dev@lists.
> "ER" == Even Rouault writes:
ER> you can't do operations on geometries with OGR SQL...
OK, I'll try it. Thanks.
The page should still have an example of actual use of
Casting ... POINT[Z], LINESTRING[Z]
Without examples people will try things like POINTZ, "POINTS[Z]"
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
LINEST