[gdal-dev] ogr2ogr to update existing table

Ivan Lucena lucena_ivan at hotmail.com
Wed Jan 20 12:18:08 PST 2016


Hi,


Is there a way to select one or two fields from a input data source to update specific fields of an existing output data source?


Let's say I want to get the values from a prticular field of the input data source and the geometry to update a specific field and the geometry of an existing output data source.


Looking at the org2gr "-fieldmap" options it says it only work with "-append" but it doesn't examplain why. If it works it would be something like:


$ ogr2ogr -update -f format output_data_source input_data_source -nln output_layer -sql "select field1 from input_layer" -fieldmap 4


Where "4" would indicate the 3th field of the output_layer.


Does anybody have another solution for that?


Thanks.


Ivan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160120/3e297492/attachment.html>


More information about the gdal-dev mailing list