Hi, I believe that OGR SQL dialect adds the geometry column into SQL selection by default. Am I right with this? I volunteer to edit the documentation https://gdal.org/user/ogr_sql_dialect.html if this is the case. But what I can't understand is another side of the story, how to select just the geometry field with OGR SQL dialect from some data sources.
This command returns both time column and geometry from GML ogrinfo -sql "select time from timetest" timetest.gml I can select just the geometry from geometry column named as "geometryProperty" by ogrinfo -sql "select geometryProperty from timetest" timetest.gml The behavior is the same with SpatiaLite when I use "-dialect OGRSQL". Geometry is selected automatically but it can be selected also by name. But I cannot discover any way to select just the geometry field from shapefile. Is it because geometry column in shapefile does not have any name as this Python test seems to prove? >>> from osgeo import ogr >>> shp_ds = ogr.Open('timetest.shp') >>> shp_lyr = shp_ds.GetLayer(0) >>> shp_lyr.GetGeometryColumn() '' OpenJUMP JML driver does not report a name for geometry column either. Is it rather an exception that drivers give names for the geometry columns? I know I can select only the geometry column with the SQLite dialect, but I am curious. -Jukka Rahkonen-
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev