Opened 13 years ago
Closed 13 years ago
#4177 closed defect (invalid)
Can't append to a PostGIS table with no geometry
Reported by: | timneedham | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | ogr2ogr append no geometry |
Cc: |
Description
OGR2OGR 1.9:
If you create a PostGIS layer using OGR2OGR that has no geometry, then subsequently try to -append data to it you get:
ERROR 1: Layer xxxxx already exists, CreateLayer failed.
I'm importing gzipped GML into PostGIS.
The actual data being imported is Ordnance Survey (UK) mastermap... which contains many layers, two of which (road and roadlinkinformation) do not have geometry data associated with them.
There is a workaround... It seems ogr2ogr only considers PostGIS tables to "exist" if they're registered in public.geometry_columns, so by creating dummy records in there everything works.
- Brilliant product by the way! :)
There are several other possibilities :
So I consider there's no further action needed.