Sunday, 9 December 2018

Appending data in PostGIS database with QGIS?


I 'm running postgis with qgis 2.6. I created a database and tables that i need to update with new datas provided with shapes. I cannot find how to insert them in table. All attributes both shapes and table are same. I don't despair to have an "easy" way instead of using an insert to command that i'm not sure to use correctly in postgis command. I've tried the database manager but i only succeed in erasing all previous data in the table >_<


Window 7 64 bits Qgis2.6 Postgis1.5 Postgrsql 9.4



Answer




You could try something like:


INSERT INTO table_name VALUES ( 1234, 'object_name', GeometryFromText ( 'POINT ( 10 20 )', -1 ) );

And if you have too many shapes to insert manually, then just create a new table with the new data and merge the two tables together.


--> Merging tables in PostGIS


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...