[gdal-dev] GDAL question

Peter P pepanpeter at gmail.com
Tue Apr 20 06:59:11 PDT 2021


Hello

I use GDAL(https://github.com/OSGeo/gdal) with python bindings. I am
importing GeoJSON to PostgreSQL (PostGIS). I know how to import only
geometry to the table. I dont know how to import geometry with others
columns to one table. I need to import geometry to "wkt_geometry" column
and his name to "name" column.
Can you help me please?

Here is how I import only geometry column:
* ogr2ogr.main(["", "-f", "PostgreSQL", "-s_srs", * *"+proj=longlat
+datum=WGS84 +no_defs", "-t_srs", "EPSG:3857", "PG:dbname='test'
host='127.0.0.1' port='5432' user='user1' password='password1'", "-nln",
"table1"])*

Thanks

Best Regards
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210420/badc468e/attachment.html>


More information about the gdal-dev mailing list