[gdal-dev] Row count limit in OGR SQL with -dialect=SQLITE
Jukka Rahkonen
jukka.rahkonen at mmmtike.fi
Mon Sep 24 08:58:46 PDT 2012
Hi,
The following SQL works fine when using Spatialite as source
osm_data>ogrinfo osm.sqlite -dialect SQLITE -sql "select * from lines
where highway is not null limit 20"
With native OSM data it fails
OSM_data>ogrinfo -dialect SQLITE finland.osm.pbf -sql "select * from lines
limit 20"
Had to open data source read-only.
INFO: Open of `finland.osm.pbf'
using driver `OSM' successful.
ERROR 1: Too many features have accumulated in points layer. Use OGR_INTERLEAVED
_READING=YES mode
Why does it fail? Is the error message correct because I can read from
http://www.gdal.org/ogr/drv_osm.html
"Note : the ogr2ogr application has been modified to use that
OGR_INTERLEAVED_READING mode without any particular user action."
Adding --config OGR_INTERLEAVED_READING YES to ogrinfo request does not lead to
desired result either
OSM_data>ogrinfo -dialect SQLITE finland.osm.pbf -sql "select * from lines
limit 20" --config OGR_INTERLEAVED_READING YES
Had to open data source read-only.
INFO: Open of `finland.osm.pbf'
using driver `OSM' successful.
Layer name: SELECT
Geometry: Unknown (any)
Feature Count: 0
Layer SRS WKT:
(unknown)
Geometry Column = GEOMETRY
osm_id: String (0.0)
name: String (0.0)
aerialway: String (0.0)
barrier: String (0.0)
highway: String (0.0)
man_made: String (0.0)
other_tags: String (0.0)
Tested with GDAL rev. 24962 on Windows.
-Jukka Rahkonen-
More information about the gdal-dev
mailing list