-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Comments
Author Name: ujaval gandhi (@spatialthoughts) Attaching the text file.
|
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.
|
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' |
Author Name: Giovanni Manghi (@gioman)
|
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.
|
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
The text was updated successfully, but these errors were encountered: