[gdal-dev] ogr2ogr, perform queries to obtain values from the database

Andrés Nadal protoplanetario at gmail.com
Thu Nov 18 06:49:36 PST 2021


Hello.

Excuse me my English, it's not my native language.

I need to convert the names (string) of classes, in some fields of a
Shapefile, to the respective numerical values of the database.

In some cases, the fields have up to 3 different classes, for different
rows.

CLASS A = 1
CLASS B = 2
CLASS B = 3

The destination table, this already exists, and contains many other fields,
this using ogr2ogr.exe, from Windows CMD.

How to indicate to ogr2ogr.exe, which performs a query first, to obtain the
numerical value of the ' CLASS B', from PostGIS.

In this way insert the value 2 in the table.

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211118/bf47b67e/attachment.html>


More information about the gdal-dev mailing list