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

CRS parsing is not correctly handled for CSV files #242

Closed
giohappy opened this issue May 22, 2024 · 1 comment · Fixed by #243
Closed

CRS parsing is not correctly handled for CSV files #242

giohappy opened this issue May 22, 2024 · 1 comment · Fixed by #243
Assignees
Milestone

Comments

@giohappy
Copy link
Contributor

@mattiagiupponi maybe it's a regression but from my tests the upload of CSV is always failing due to exceptions thrown inside BaseVectorFileHandler.identify_authority().

With CSV files layer.GetSpatialRef() returns always None, so both the try and the exception handler will fail at retrieving the CRS.
I think BaseVectorFileHandler.identify_authority() should be overridden by the CSV handler and, for simple geom fields (lat/lon) the CRS will be forced to EPSG:4326

@giohappy giohappy added this to the 1.0.9 milestone May 22, 2024
@mattiagiupponi
Copy link
Contributor

For the CSV is indeed force to EPSG:4326
In this case with the introduction of this fix #233. For the CSV that checks is not useful since the authority is extracted later. We can justlet the CSV skip that part. Once the CSV is validated we are good to go

giohappy added a commit that referenced this issue May 22, 2024
[Fixes #242] CRS parsing is not correctly handled for CSV files
mattiagiupponi added a commit that referenced this issue Jun 17, 2024
* [Fixes #242] CRS parsing is not correctly handled for CSV files
* Let importer create the asset
* Add test coverage for asset-importer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants