Opened 11 years ago
Closed 11 years ago
#4637 closed defect (fixed)
VRT driver does not implement GetFIDColumn()
Reported by: | kyngchaos | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.0 |
Component: | OGR_SF | Version: | 1.9.0 |
Severity: | normal | Keywords: | vrt |
Cc: |
Description (last modified by )
The VRT driver does not implement the GetFIDColumn() method for cases when the <FID> tag is used to specify a source attribute to use as FID.
Change History (5)
comment:1 by , 11 years ago
Keywords: | vrt added |
---|
comment:2 by , 11 years ago
Well, William meant that the *name* of the FID column is not reported. See http://lists.osgeo.org/pipermail/gdal-dev/2012-April/032584.html
comment:3 by , 11 years ago
Description: | modified (diff) |
---|---|
Summary: | vrt driver does not report FID column info → VRT driver does not implement GetFIDColumn() |
Subject and text updated accordingly.
Note that I suspect the result of a VRT does not have to have all the attributes of the source and so the FID column from the source might not actually appear in the virtual layer. In such a case GetFIDColumn() should *not* return the name.
comment:4 by , 11 years ago
Milestone: | 1.9.1 |
---|
comment:5 by , 11 years ago
Milestone: | → 2.0.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
r24311 /trunk/ (4 files in 3 dirs): VRT: implement GetFIDColumn() (#4637)
Frank, I agree with your restriction that the "FID column from the source might not actually appear in the virtual layer. In such a case GetFIDColumn() should *not* return the name". But actually that's not always respected by other drivers.
For example, see the PG driver where the FID column is 'hidden' in the regular fields, but exposed at the FID column by GetFIDColumn(). But in that situation, what is reported by the GetFIDColumn() can be queried with ExecuteSQL() (as it is directly interpreted by the PG driver engine.
$ ogrinfo pg:dbname=autotest poly -so -al INFO: Open of `pg:dbname=autotest' using driver `PostgreSQL' successful. Layer name: poly Geometry: Multi Polygon Feature Count: 9 Extent: (478315.531250, 4762880.500000) - (481645.312500, 4765610.500000) Layer SRS WKT: (unknown) FID Column = ogc_fid Geometry Column = wkb_geometry area: Real (12.3) eas_id: Real (0.0) prfedea: String (16.0)
But that's a bit of the particular case, and I haven't tried to address that.
William,
This is not an actionable bug report.
If I'm in autotest/ogr and issue the following command I see FID's reported by ogrinfo through the VRT driver based on the FID column.
So obviously there is something specific about your problem that you are going to have to support.