Ticket #4272 (closed defect: wontfix)

Opened 20 months ago

Last modified 20 months ago

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

cha06.sqlite Download (5.0 KB) - added by peifer 20 months ago.

Change History

Changed 20 months ago by peifer

Changed 20 months ago by peifer

Hmm. The correct feature count is reported when using -so rather than -geom=no, see below.

[peifer@whitefish:filegdb]> ogrinfo -al -so --debug on cha06.sqlite
SQLITE: OGR style SQLite DB found !
OGR: OGROpen(cha06.sqlite/0x1672a10) 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 0x16841d8
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)

SQLite: 1 features read on layer 'cha06'.

Changed 20 months ago by rouault

  • status changed from new to closed
  • resolution set to wontfix

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.

Note: See TracTickets for help on using tickets.