2

Is there a tool that works like the data loader of ArcGIS for QGIS (or via Spatialite )? To integrate data in a database or a shapefile without having the same structure (and the tool allows to propose which column goes with every other column)

For example, we have a layer of trees; two people go on the field and inform each new tree layer (without necessarily having the same structure / field names). They come back ; I want to integrate their new trees quickly and easily without having to explicitly rename their fields: ArcGIS allows in a geodatabase with the tool "load data" that makes a direct link between the fields of the two layers (linking with a gui).

  • Could you maybe go deeper into detail with an example maybe if possible. I'm not familar with that and never did anything but maybe that would help. Thanks. – kwoxer Mar 19 '15 at 17:58
  • I haven't found anything like that yet, lets hope that there is one. – Devdatta Tengshe Mar 24 '15 at 12:43
1

If you're working with spatialite, here's how to do what you want: The SQL format is

INSERT INTO ...
SELECT FROM ...

So, suppose you have a permanent spatial table "trees" with columns attrib1, attrib2, attrib3. Now one of the field guys brings a new shapefile "new_trees" with equivalent fields col_x, col_y, col_z. You would import the new shapefile into spatialite then do:

INSERT INTO trees (attrib1, attrib2, attrib3, geometry)
SELECT col_x, col_y, col_z, geometry FROM new_trees;

And then you can drop the imported "new_trees" table

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.