Editable GeoCSV QGIS Plugin

Aus Geoinformation HSR
(Weitergeleitet von Editable GeoCSV)
Wechseln zu: Navigation, Suche
EditableCSV QGIS Plugin Icon.png
The file open dialog after clicking on "Add GeoCSV layer..." on the "green document icon with a plus".
>> Archived <<

Load, edit and save GeoCSV files in QGIS in order to integrate with spreadsheet programs like LibreOffice or Kettle.

About

This plugin allows files in CSV format to be loaded, edited and saved in QGIS including geometry. This allows to integrate QGIS with spreadsheet programs like LibreOffice [1] or Kettle (see GeoKettle).

These are some features and advantages of this plugin:

  • Allows to edit a CSV text layer (which built-in "Add delimited text layer..." can't).
  • Is designed to co-operate with spreadsheets like LibreOffice and mainstream IT.
  • Supports attribute names longer than 10 characters (unlike Shapefiles).
  • Supports all OGC geometry types (WKT) (unlike Shapefiles which supports only Point, Linestring, Polygon and Multipoint).
  • Manages data types, stored in .csvt (unlike Shapefiles).
  • Manages the coordinate reference system, which are stored in .prj file (like Shapefiles).

Help

What is GeoCSV?
It's the very common CSV text file format (originally ) plus a geometry attibute/field. See the GeoCSV specification.
Why not just use Shapefiles? What's the difference and what's common?
Shapefiles 1. is a binary file format cluttered over three mandatory files (.shp,.dbf,.shx), 2. allows only 10 characters per attibute/field and 3. knows only Point, Linestring, Polygon and MultiPoint. GeoCSV combines a well-known IT text format with geometry encoded as well-known text (WKT) or longitude/latitude. GeoCVS can be directly written and read by common software, like text spreadsheets and text editors.
Why not just use built-in "Add delimited text layer..."?
The built-in CSV reader does'nt allow to edit a CSV text layer, it does'nt store the coordinate reference system nor the data types, among others.
How can I install this plugin for QGIS?
See the installation steps.
How can I create a new GeoCSV file?
There's no menu command for this yet, but there's a template.csv file in the Python plugins directory at sub path /test/. Find and copy template.csv to a file name of your choice, then use "Add new GeoCSV layer..." to add this file to QGIS, finally set Edit mode to on and go to the layer properties where you can add new attributes. Don't forget to update existing fields.
Which software do you recommend to edit a CSV file?
Use a good text editor like Notepad++ (Windows) or Sublime (Mac) to do a Search&Replace or save the file as UTF-8.
I have problems opening and saving CSV - which spreadsheet program do you recommend?
We recommend LibreOffice and we recommend to avoid Excel.
In QGIS I get the error, that the file is locked and/or could not be written. What is the reason?
Most probably the file is opened under Windows with Excel or LibreOffice. These programs lock the file for exclusive writing. There are Windows programs like TextPad++ which allow concurrent editing (and under Mac this problem should not occur).
I got the following error when opening a GeoCSV file "An error occured while trying to update the CSVT file according to the new attribute types. Please update the csvt file manually."
See the CSVT specification.
I got the following error when opening a GeoCSV file "CSVT file contains incorrect geo attributes. Please set manually."
See the CSVT specification.
I got the following error when opening a GeoCSV file "CSVT file contains too many geo attributes. Please set manually."
See the CSVT specification.
I got the following error when opening a GeoCSV file "Erroneous delimiter detected. The delimiter should be a ';'."
Use a text editor or another CSV tool to set the field delimiter to ';'. GeoCSV has chosen ';' because it's less used in free text than ',' and visible as opposite to 'tab'.

Installation

Prerequisites: You need internet access.

Installation steps:

  1. Install QGIS locally - or download "QGIS Portable" e.g. on a USB stick - and start QGIS.
  2. Enable experimental plugins in QGIS: Goto menu "Plugins > Manage and install plugins".
  3. In the QGIS "Plugins" dialog, goto tab "Settings" and check "Show also experimental plugins".
  4. In the QGIS "Plugins" dialog search for CSV or "Editable GeoCSV", then click "Install" on the plugin description to install it.
  5. Ready! Now you should see an entry "Editable QGIS > Add GeoCSV layer..." in the QGIS menu bar "Plugins" as well as this icon EditableCSV QGIS Plugin Icon.png in the icon bar ("green document icon with a plus").