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

'Add Delimited Text Layer' not setting CRS query parameter in the URI #21624

Closed
qgib opened this issue Oct 12, 2015 · 5 comments
Closed

'Add Delimited Text Layer' not setting CRS query parameter in the URI #21624

qgib opened this issue Oct 12, 2015 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Oct 12, 2015

Author Name: ujaval gandhi (@spatialthoughts)
Original Redmine Issue: 13582
Affected QGIS version: 2.8.3


When loading a CSV file using the Layer -> Add Delimited Text Layer, the default CRS is assumed as EPSG:4326. But this is not defined in the URI. This is a sample URI when you load the attached file in QGIS.

file:///C:/Users/Ujaval/Downloads/signif.txt?type=csv&delimiter=%5Ct&xField=LONGITUDE&yField=LATITUDE&spatialIndex=yes&subsetIndex=no&watchFile=no

The Layer CRS is defined correctly for delimited text layers. But if one queries for the Data Provider CRS, it returns an empty CRS value. The fTool plugin uses the dataProvider().crs() to determine the layer CRS and throws an error when using CSV layers.

I believe setting the crs parameter based on the selected CRS in the URI would fix this

file:///C:/Users/Ujaval/Downloads/signif.txt?type=csv&delimiter=%5Ct&xField=LONGITUDE&yField=LATITUDE&spatialIndex=yes&subsetIndex=no&watchFile=no&crs=EPSG:4326


@qgib
Copy link
Contributor Author

qgib commented Oct 12, 2015

Author Name: ujaval gandhi (@spatialthoughts)


Attaching the text file.


  • 9181 was configured as signif.txt

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2016

Author Name: Alexander Bruy (@alexbruy)


Which fTools tool do you refer to? I checked in master with "Define current projection" and there is no error when using CVS file.


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jan 19, 2016

Author Name: ujaval gandhi (@spatialthoughts)


The problem is with the fTools tools that use a CRS check. For example, if one layer is a CSV layer and another shapefile, the Points in Polygon tool gives a CRS warning even though the CRS is the same.

This is because the CRS check queries dataProvider().crs() which is empty for CSV layers. Also if you use 'Define current projection' tool and set the CRS, the next time you open the tool, the CRS still shows 'Missing of undefined'

@qgib
Copy link
Contributor Author

qgib commented May 23, 2016

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Feedback to Open

@qgib
Copy link
Contributor Author

qgib commented Dec 30, 2016

Author Name: Alexander Bruy (@alexbruy)


CVS files does not have CRS definition in it. So provider CRS always none and only layer CRS makes sense.


  • resolution was changed from to wontfix
  • status_id was changed from Open to Closed

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 25, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 25, 2019
@qgib qgib closed this as completed 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!
Projects
None yet
Development

No branches or pull requests

1 participant