Tuesday, 4 December 2018

postgis - Getting query output from ogr2ogr?



I want to get SQL command from ogr2ogr. My og2ogr command is:


ogr2ogr -append -f "PostgreSQL" PG:"host=localhost user=sa dbname=name password=secpsw" commm.dbf -nln "commision"

and i want it as like this:


MyOgr2ogr command > output.sql

ogr2ogr result is SQL commnand, which insert Dbf file to PostGIS. But I get not this SQL command. SQL command is hidden and I wanto to show it



For example shp2pgsql command produce SQL command and i can use shp2psql > insert.sql




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...