5

QGIS allows for opening very many different file formats.

Some of these are directly editable. It is possible to open the data/file, immediately edit the data in QGIS, then save back to the original file.

Many formats can be opened/read, and at the same time it is possible to save/write to that format BUT these require that the data is saved into a second format before editing is possible. This is fundamentally different from the first situation.

The question is what data formats are directly editable by QGIS (the first situation as opposed to the second)?

Reasons a list is helpful...

I think that sometimes QGIS doesn't handle this whole issue terribly well - for example in the past I have had some Excel files look like they are editable but the process ultimately fails - which adds confusion.

Notes at gdal.org provide some information, but it can be very difficult to distinguish between the two situations above - formats which are directly editable, and on the other hand formats which can both be read and written (but aren't directly editable).

It is helpful to have information about QGIS (or ogr) version in answers.

  • By using the command ogrinfo --formats in OSGeo4W shell, you can see a list with the information that you want (or here: http://www.gdal.org/ogr_formats.html). – xunilk Apr 16 '15 at 10:44
  • Thanks - but I don't think this information does tell me what I want. For example, using the OSGeo4W shell process I get "MapInfo File <read/write>" which I'd take to mean that I ought to be able to edit MapInfo TAB files. I can't do this. I can both read from and write to MapInfo TAB files - but that's beside the point. – Rostranimin Apr 16 '15 at 16:57
  • This is an important question, I am trying to find out the right answer myself. Can you please uncheck the answer below by Luke? It is incorrect and would be important to have a proper answer. – Luís de Sousa Aug 23 '17 at 8:04
  • Done. Also refined and updated the question a little and added a partial answer so that the beginnings of a list is included. – Rostranimin Aug 23 '17 at 11:46
  • I'd not noticed Luke's comment before. This seems to offer an answer for ogr based formats - but the output from using 'ogrinfo --formats' is quite long and complex. e.g. '(rw+v)' '(rw+s)' '(rw+)' '(ro)' '(rov)'. Are we only looking for those formats which indicate '(rw+)' ? – Rostranimin Aug 23 '17 at 16:23
4

Here is an updated list of editable vector layer files (tested with QGIS 2.18, but as far as I know this is the same with QGIS 3). I will also list the feature classes mentioned by the OP in order to have everything in the same place.

File formats:

  • Geopackages

  • Geojson

  • Geoconcept

  • MapInfo TAB

  • Shapefiles

  • Sqlite

  • FileGeodatabase (if the fileGDB library is installed, OGR >= 1.9, see here)

data in RDBMS (i.e. databases)

  • PostGIS/PostGres

  • SpatiaLite

  • MySQL

  • Oracle (if library is installed)

2

As of 2.18.12, in my limited experience:

  • SHP - read/write
  • Spatialite - read/write
  • XLSX - read/write if you use the Add Spreadsheet Layer plugin*
  • CSV - read only (unless you use the Add Spreadsheet Layer/.csvt method)
  • DXF - read only
  • KML - read only
  • Access database files (MDB/ACCDB) - using ODBC, read only (again afaik, haven't tried since switching to 64bit)

*only if the file is properly formatted and correctly detects headers and types (this easily gets messed up in Excel). And, I think, if the file is not open when you import it. Otherwise it will be read-only. Also, when saving edits made in QGIS, the XLSX file may have "corrupted" XML schemas when opening in Excel, and of course all formatting is lost, so it is not quite as read/write friendly as with say SHP or Spatialite... it's a bit of a hack really.

  • Looking good - I'll not immediately mark this as answered as you acknowledge it to be an incomplete list - but thank you. – Rostranimin Aug 23 '17 at 12:27
  • 1
    Actually, looking at this again, it would be clearer if we listed these formats with THREE potential categories - read, write AND edit. To explain - QGIS can both read and write KML (so the list above is inaccurate), but it can't edit it. – Rostranimin Aug 23 '17 at 15:54
  • That's a good distinction. I've been casually using 'write' to encompass 'edit', rather than 'output' (if I am understanding you correctly here). But are there many formats that QGIS can read but not write to/output/export in any way? I have a feeling basic input/output falls more under ogr2ogr than qgis itself, anyway... – she_weeds Aug 24 '17 at 12:56
  • My experience has been that there are a great many formats that can both be read AND written. KML is the example I've given quite a few times because it's so well known, but there are others. GPX, CSV (if loaded in some ways). There may be a few which only allow one of these, but on the whole they will be more obscure formats and there's plenty of information on OGR formats here: ( gdal.org/ogr_formats.html ). But finding out which are editable is much harder. Not least of the issues is that the question is easily misunderstood. – Rostranimin Aug 24 '17 at 13:59
0

I have never been able to directly edit imported Shape files, Tab Files or any other files you have mentioned. I have always had to save or export the imported files to another file, to be able to edit them. I have had trouble with editing imported Spatial Lite files as well.

I just import, and export now without trying to edit original data. I have done this since Version 1.8, and have not tried editing imported data since then.

I may try with 2.8 just to see if anything has changed.

There may also be differences when using 32 bit QGIS, and 64 bit QGIS due to support for the dbf file being non-native in 64 bit software.

  • That's an interesting perspective. 99% of the SHP files which I work with are ones I generate directly in QGIS so I probably wouldn't have noticed if editing other people's SHP files caused issues. However if that were the case it would be surprising. – Rostranimin Jun 1 '15 at 8:52
  • 1
    I have never had trouble editing Shape files that I have created in QGIS, but I do receive a great deal of data from other sources, some of which may need editing, or updating. I have just adopted the import, then save as a different file name method to do this. I actually like doing this for one reason, I can track the changes, or edits made without manipulating the original data. This has actually saved me several times in the past, and has ended some pretty heated arguments with people who were trying to cover up their mistakes. Just some food, and methods for thought. – jbgramm Jun 1 '15 at 14:08
  • This answer is clearly now out of date and presumably indicates specific issues encountered by jbgramm rather than QGIS issues. – Rostranimin Aug 23 '17 at 11:48
  • @Rostranimin, I agree, the issues are old, and seemingly no longer exist for me, although there are some new issues with updating fields in tables that I have created, or have received from others using QGIS 2.18.12. I will post that in a different thread after thoroughly checking to see if I am missing something obvious. I still adhere to the methodology I described above just out of prudence. – jbgramm Aug 24 '17 at 22:05
0

Most data formats that QGIS supports are included via GDAL/OGR.

To check if a certain format is available with read/write support, lookup the GDAL/OGR version in the about dialog of your local QGIS installation and then go to the OGR Vector Formats page and check the status of the format you are interested in.

In the end, it is more up to the OGR version than the QGIS version, which ones are supported. In practice, higher QGIS version numbers normally mean newer OGR versions, but this is no hard rule.

Then there is also a list of providers that do not use OGR, mostly database formats (postgis, oracle, mssql, spatialite, ...) which support writing, regardless what the OGR page says (although I think they are also listed as writable there...).

Just for the theoretical background :P

  • Thanks. Part of my reason for asking the question is that I felt that others also would like to see a simple list (essentially this information ought to be very easy to find). I find that I can't interpret the OGR information to answer my question (although it makes clear what can be read/written it doesn't help me to understand what can be edited directly). I've tidied up the question a bit more. – Rostranimin Apr 9 '18 at 20:28
  • A fair expectation for the question. I mostly meant to give this information in addition to this list because while such a list is very handy and accurate enough for most use cases, it will not be completely precise. – Matthias Kuhn Apr 27 '18 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.