1

I am trying to create a temporary spatial data from a PostGIS database that a user can do the editing on. Currently, I have a service that returns GeoJSON from the PostGIS database. But I don't think it's possible to edit GeoJSON using QGIS. What is the reason?

Secondly, what would be the best format to do the editing then to convert it back to GeoJSON. I have shapefile and Spatialite in mind. The downside of shapefile is that I can only use one table per one shapefile. If for example I have a line and a polygon table, I would need two shapefiles for each. I am not sure what advantage Spatialite offers over shapefile? Is it possible to edit Spatialite data on QGIS? How comparable is Spatialite to Esri Personal Geodatabase?

1
  • 1
    It is general policy here as GIS SE to ask one question per Question. "Best" questions are often closed as opinion-based, so please try to edit this question into something which can have a single answer.
    – Vince
    Aug 19, 2015 at 13:08

1 Answer 1

1

Have you tried using the Offline plugin for QGIS? This syncs your PostGIS database to SpatiaLite and then syncs it back.

https://docs.qgis.org/2.2/en/docs/user_manual/plugins/plugins_offline_editing.html

If you need something custom, then go Spatialite; QGIS can edit it and you can setup triggers, views, querys etc that you have in your PostGIS database also. It is also built off SQLite, which is used as local databases for many mobile apps, particularly on Android etc. It is very useful in order to store many datasets of different geometry type in one file.

However it is worth noting that QGIS can load and edit almost any spatial data format, and conversion to any format is simple. So going from shapefile to GeoJSON or spatialite table to GeoJSON, is a matter of going 'Save As' in the layer properties.

1
  • Thanks a bunch. I am trying to write a script with PyQGIS to do the task. I don't know the reason but QGIS is not editing GeoJSON, GML or KML. Spatialite seems the way forward.
    – Papios
    Aug 20, 2015 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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