ogr2ogr -skipfailures backs out previous successful insert to postgis
When appending to a PostGIS table, using the -skipfailures flag, when an error is encountered and skipped, it looks like the previously successful feature insert is getting reverted/backed out. An example is appending a TIGER county shapefile to the table that is adjacent to a county already appended, where the lines along the county border are duplicated. I have the 'tlid' field set as the primary key (changed from the default ogc_fid field added by OGR on initial import).
ogr2ogr -update -append -skipfailures -a_srs EPSG:4269 -nln edges -f PostgreSQL PG:'dbname=tiger' fe_2007_55021_edges.shp
Where FIPS county 55025 (adjacent county to the south) has already been successfully and completely imported.
There are many failure errors, as expected for the duplicate shared lines along their common border. But now there are many missing lines inside the newly imported county that are not common county boundary lines.
When I look at the missing lines in the original shapefile, they appear to be the record just before a skipped county line. ie:
shape 1 OK shape 2 missing interior line shape 3 missing shared county boundary, the one skipped by ogr2ogr shape 4 OK ...
None of the missing interior lines are in the error log, only the ones skipped.
Change History (9)
follow-up: 5 comment:4 by , 16 years ago
|OGR_SF → Utilities
|critical → normal
|assigned → closed