Opened 12 years ago
Closed 12 years ago
#4272 closed defect (wontfix)
SQLite: debug message doubles feature count
Reported by: | peifer | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | minor | Keywords: | SQLite |
Cc: |
Description
SQLite claims to have read 2 features in a layer which only contains a single feature, see attached.
$ ogrinfo -al -geom=no --debug on cha06.sqlite SQLITE: OGR style SQLite DB found ! OGR: OGROpen(cha06.sqlite/0x10cca10) succeeded as SQLite. INFO: Open of `cha06.sqlite' using driver `SQLite' successful. OGR: GetLayerCount() = 1 Layer name: cha06 Geometry: Multi Polygon Feature Count: 1 OGR_SQLITE: finalize 0x10da8a8 Extent: (5.605545, 50.080295) - (5.610084, 50.081801) Layer SRS WKT: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]] FID Column = OGC_FID Geometry Column = GEOMETRY code_06: Integer (0.0) code_00: Integer (0.0) id: String (0.0) change: String (0.0) area_ha: Real (0.0) OGRFeature(cha06):1 code_06 (Integer) = 324 code_00 (Integer) = 311 id (String) = EU-92353 change (String) = 311-324 area_ha (Real) = 2.51962890318536 OGR_SQLITE: finalize 0x10da8a8 SQLite: 2 features read on layer 'cha06'.
Attachments (1)
Change History (3)
by , 12 years ago
Attachment: | cha06.sqlite added |
---|
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The "SQLite: X features read on layer 'cha06'" is a technical trace that users should not see. There's no direct correlation between the number X reported and the number of features of the layer. The X is the number of features that have been read in all operations, which can be greater than the number of features in the layer, if you iterate several times over the layer.
When you do a -al, you will have one pass to display all the features, and another one to compute the spatial extent for example (which requires iterating over all features).
When you do just -so, you just have one pass to compute the spatial extent.
So, looks consistant to me.
Hmm. The correct feature count is reported when using
-so
rather than-geom=no
, see below.