Friday 22 January 2016

postgresql - Is there an option in OGR2OGR to repair geometry when importing data to PostGIS?



this is related to one of my questions here Invalid Geometry in PostGIS but Valid in FGDB


If I could, I want to repair geometry while I am importing my data to PostGIS. So I wrote this code below on OSgeo4W Shell


ogr2ogr -overwrite -progress -f "PostgreSQL" PG:"host=localhost port=5432 dbname=test user=test password=test" D:\FGDB_Edit\OCEAN.gdb -lco GEOMETRY_NAME=shape -t_srs EPSG:3857 -nln ocean_repair -dialect sqlite -sql "select ST_MakeValid(Shape) as geometry, * from ocean_boundary"

and it gives me this error enter image description here


have you experienced this before? and have any solutions?




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