[gdal-dev] Error when appending non-spatial tables in GML to PostGIS

Matt Walker walkermatt at longwayaround.org.uk
Wed Nov 27 04:32:19 PST 2013


Thanks Even, that was exactly what I needed. I'm now able to load the
lookup tables successfully thanks for your help.


On 26 November 2013 13:55, Even Rouault <even.rouault at mines-paris.org>wrote:

> Selon Matt Walker <walkermatt at longwayaround.org.uk>:
>
> > Hi,
> >
> > I'm loading some Ordnance Survey ITN GML data into PostgreSQL 9.1 /
> PostGIS
> > 1.5 which contains a number of feature types that are lookups without any
> > geometry, the first file loads fine but loading subsequent files using
> the
> > ogr2ogr -append option fails with the error:
> >
> >     ERROR 1: Layer road already exists, CreateLayer failed.
> >     Use the layer creation option OVERWRITE=YES to replace it.
> >
> > I'm finding that the gfs file generated by OGR sets the geometry type to
> > 100 (no geometry), manually editing the gfs file to remove the
> GeometryType
> > element for the lookup feature types works around the error but creates a
> > redundant geometry column and an entry in geometry_columns.
> >
> > I've put further details and two sample gml files containing a single
> > "feature" in each here: https://gist.github.com/walkermatt/7655745
> >
> > Happy to create at ticket if it's appropriate.
>
> You probably need to add "--config PG_LIST_ALL_TABLES YES" on the command
> line
> so that the table without geometry is correctly loaded (after it has been
> created). By default only registered spatial tables are recognized. See
> http://gdal.org/ogr/drv_pg_advanced.html
> The .gfs hack is likely unnecessary.
>
> >
> > Thanks,
> >
> > Matt
> >
> > --
> > Matt Walker
> > Astun Technology
> > @_walkermatt
> >
>
>
>


-- 
Matt Walker
@_walkermatt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131127/03343c59/attachment.html>


More information about the gdal-dev mailing list