Ticket #721 (assigned defect)
Shapefile has repeated fields, ogr2ogr bails on defining the second in postgis
| Reported by: | tylermitchell@… | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | OGR_SF | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
This file sucks and I don't expect ogr2ogr to handle buggy data, but it would be nice if it could handle this inconsistency rather than letting PostGIS halt the process. Could ogr2ogr handle checking for problematic field names (i.e. duplicates) rather than leaving it up to PostGIS to complain? It'd be even greater if it could rename repeated attributes before getting that far. Perhaps there is already an lco that I'm not aware of? > ogr2ogr -f "PostgreSQL" "PG:dbname=project1" pres_nov28.shp ERROR 1: ALTER TABLE "pres_nov28" ADD COLUMN "state_fips" CHAR(12) ERROR: column "state_fips" of relation "pres_nov28" already exists ERROR 1: ALTER TABLE "pres_nov28" ADD COLUMN "cnty_fips" CHAR(13) ERROR: column "cnty_fips" of relation "pres_nov28" already exists ERROR 1: INSERT command for new feature failed. ERROR: new row for relation "pres_nov28" violates check constraint "$2" ERROR 1: Terminating translation prematurely after failed translation of layer pres_nov28
Change History
Note: See
TracTickets for help on using
tickets.
