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

Using {X,Y}_POSSIBLE_NAMES when opening a CSV file fails to attach geometries to features #45534

Closed
2 tasks done
nirvn opened this issue Oct 16, 2021 · 2 comments · Fixed by #45535
Closed
2 tasks done
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers

Comments

@nirvn
Copy link
Contributor

nirvn commented Oct 16, 2021

What is the bug or the crash?

When using the {X,Y}_POSSIBLE_NAMES ogr driver options when opening a CSV file fails to attach geometries to features. It's quite odd as the vector layer properties window does show a proper extent matching the point values.

Guestimated problem: those driver options aren't passed to the feature iterator. If that's the case, it's a pretty serious issue.

Steps to reproduce the issue

Test dataset:
test.csv

  1. Add the following test.csv as a vector layer via the data source manager, and set the X_POSSIBLE_NAMES to 'Longitude' and Y_POSSIBLE_NAMES to 'Latitude'
  2. Right click on the vector layer, and select the 'zoom to layer(s)' action
  3. Notice how no points are displayed on the map (bad)
  4. Open the vector layer properties dialog and go to the general panel
  5. Notice how there's an extent shown (good)

Versions

QGIS master

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@nirvn nirvn added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 16, 2021
@nirvn
Copy link
Contributor Author

nirvn commented Oct 16, 2021

@rouault , I'm becoming increasingly certain we're not passing the open options to the QgsOgrFeatureIterator, which I assume most lead to more problems than just this CSV issue.

@nirvn
Copy link
Contributor Author

nirvn commented Oct 16, 2021

OK, identified the problem, fix to come.

nirvn added a commit to nirvn/QGIS that referenced this issue Oct 16, 2021
@gioman gioman added the Data Provider Related to specific vector, raster or mesh data providers label Oct 16, 2021
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! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants