[QGIS-Developer] Editable CSV files

Borys Jurgiel lists at borysjurgiel.pl
Wed Jul 19 08:01:42 PDT 2017


Dnia środa, 19 lipca 2017 09:32:54 Paolo Cavallini pisze:
> unfortunately, AFAIK drag&drop does not alow to spatialize the text
> layer, so in most cases an user is forced to use the delimited text
> provider. There are external plugins that allow spatialization after
> loading.
> All the best.

You can spatialize them by drag&drop. In GDAL >= 2.1 it's as easy as creating 
an additional .csvt file with column type declarations. In older versions of 
GDAL, you need to access the csv via an additional .vrt file. See [1].

Hovever, there are still unsolved problems. With GDAL 1.10, I only can add new 
features (like it is in postgis layer with missing primary key). With GDAL 
2.2, I have full edit capabilities, however, QGIS corrupts the .csvt file on 
save by replacing the CoordX/CoordY/Point(X)/Point(Y) declarations with simple 
Float. As a result, next time you try to open the file, QGIS finds it non-
geometry.

I guess fixing the last issue is a way to go. Once it's solved, maybe we even 
don't need the CSV provider anymore?

Regards,
Borys

[1] http://www.gdal.org/drv_csv.html


More information about the QGIS-Developer mailing list