<div dir="ltr">Thanks Even, that was exactly what I needed. I'm now able to load the lookup tables successfully thanks for your help. <br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 26 November 2013 13:55, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Selon Matt Walker <<a href="mailto:walkermatt@longwayaround.org.uk">walkermatt@longwayaround.org.uk</a>>:<br>
<div><div class="h5"><br>
> Hi,<br>
><br>
> I'm loading some Ordnance Survey ITN GML data into PostgreSQL 9.1 / PostGIS<br>
> 1.5 which contains a number of feature types that are lookups without any<br>
> geometry, the first file loads fine but loading subsequent files using the<br>
> ogr2ogr -append option fails with the error:<br>
><br>
>     ERROR 1: Layer road already exists, CreateLayer failed.<br>
>     Use the layer creation option OVERWRITE=YES to replace it.<br>
><br>
> I'm finding that the gfs file generated by OGR sets the geometry type to<br>
> 100 (no geometry), manually editing the gfs file to remove the GeometryType<br>
> element for the lookup feature types works around the error but creates a<br>
> redundant geometry column and an entry in geometry_columns.<br>
><br>
> I've put further details and two sample gml files containing a single<br>
> "feature" in each here: <a href="https://gist.github.com/walkermatt/7655745" target="_blank">https://gist.github.com/walkermatt/7655745</a><br>
><br>
> Happy to create at ticket if it's appropriate.<br>
<br>
</div></div>You probably need to add "--config PG_LIST_ALL_TABLES YES" on the command line<br>
so that the table without geometry is correctly loaded (after it has been<br>
created). By default only registered spatial tables are recognized. See<br>
<a href="http://gdal.org/ogr/drv_pg_advanced.html" target="_blank">http://gdal.org/ogr/drv_pg_advanced.html</a><br>
The .gfs hack is likely unnecessary.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Thanks,<br>
><br>
> Matt<br>
><br>
> --<br>
> Matt Walker<br>
> Astun Technology<br>
> @_walkermatt<br>
><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Matt Walker<br>@_walkermatt<br>
</div>