Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong number of attributes rows when opening a GML file #24388

Closed
qgib opened this issue Apr 28, 2017 · 5 comments
Closed

Wrong number of attributes rows when opening a GML file #24388

qgib opened this issue Apr 28, 2017 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Apr 28, 2017

Author Name: Kai Borgolte (@Redoute)
Original Redmine Issue: 16480
Affected QGIS version: 2.18.6
Redmine category:vectors


I tried to follow [[http://docs.qgis.org/testing/en/docs/user_manual/introduction/getting_started.html#id8]] and opened lakes.gml from [[http://qgis.org/downloads/data/qgis_sample_data.zip]].

Labeling shows only one label, and the attribute table show only one feature from 15. As far as I understand the problem seems to be that in the gml file all features have identic fid="F0".


@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


Confirmed here on 2.18 and current master, 2.14 is working as expected

One problem is that in the GML indeed every feature has F0 as fid, and QGIS sees them as one feature (when using the select tool or looking at the attribute table). The count features counts 15 though?..

if I do ogrinfo lakes.gml lakes it shows 15 features all with the same id: 0 and fid F0

OGRFeature(lakes):0
fid (String) = F0
cat (Integer) = 14
NAMES (String) = Becharof Lake
AREA_MI (Real) = 456

OGRFeature(lakes):0
fid (String) = F0
cat (Integer) = 15
NAMES (String) = Lower Ugashik Lake
AREA_MI (Real) = 160

this also could be considered a data issue though, not sure how strict gml is with it's fid...


  • description was changed from I tried to follow [[http://docs.qgis.org/testing/en/docs/user_manual/introduction/getting_started.html#id8]] and opened lakes.gml from [[http://qgis.org/downloads/data/qgis_sample_data.zip]].

Labeling shows only one label, and the attribute table show only one feature from 15. As far as I understand the problem seems to be that in the gml file all features have identic fid="F0".
to I tried to follow [[http://docs.qgis.org/testing/en/docs/user_manual/introduction/getting_started.html#id8]] and opened lakes.gml from [[http://qgis.org/downloads/data/qgis_sample_data.zip]].

Labeling shows only one label, and the attribute table show only one feature from 15. As far as I understand the problem seems to be that in the gml file all features have identic fid="F0".

  • regression was configured as 1

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Giovanni Manghi (@gioman)


Could it be something that depends on the GDAL version used in different QGIS releases?


  • category_id was changed from Documentation and Help to Translations and international
  • priority_id was changed from Normal to High
  • subject was changed from lakes.gml in sample data is faulty to Wrong number of attributes rows when opening a GML file

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Richard Duivenvoorde (@rduivenvoorde)


I compile 2.14, 2.18 and master all (currently) with GDAL 2.1.2. And only 2.14 is 'working'.

So, it is an actual data/qgis problem.

I discussed it here (Essen) with some dev's and it is because attribute table etc actuall uses the fid's (which are all the same).

Using:

ogr2ogr -oo EXPOSE_GML_ID=YES -f 'GML' lakes-fixed.gml lakes.gml

you can actually fix the data and make it work in QGIS.. I attached a fixed version, and will update the data.zip


  • 10914 was configured as lakes-fixed.gml

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Open to Closed
  • category_id was changed from Translations and international to Vectors
  • resolution was changed from to wontfix

@qgib qgib closed this as completed May 1, 2017
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Vectors Related to general vector layer handling (not specific data formats) Regression Something which used to work, but doesn't anymore labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! High Priority Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant