[Fwd: Re: [Gdal-dev] ogr2ogr PostgreSQL and INTERLIS issues]

Andreas Neumann a.neumann at carto.net
Wed Oct 24 11:42:47 EDT 2007


I accidentally sent this mail to Frank only, sorry.
Andreas

---------------------------- Original Message ----------------------------
Subject: Re: [Gdal-dev] ogr2ogr PostgreSQL and INTERLIS issues
From:    "Andreas Neumann" <a.neumann at carto.net>
Date:    Wed, October 24, 2007 5:41 pm
To:      "Frank Warmerdam" <warmerdam at pobox.com>
--------------------------------------------------------------------------

Hi Frank,

thank you very much for answering my questions. I will contact Pirmin
about the 2nd problem and file a bug.

As to the first problem: the concerned table is listed in
"public.geometry_columns" - but the table itself is in another schema,
called "av". Could there be an issue when several schemas are involved? Is
ogr2ogr fully schema aware?

Thank you for an answer regarding problem 1,
Andreas

> Andreas Neumann wrote:
>> Despite my flags "append" and "update" ogr2ogr is trying to create a new
>> table. I get the following error message:
>>
>> ----------------------
>> ERROR 1: CREATE TABLE av."Bodenbedeckung__BoFlaeche" ( OGC_FID SERIAL,
>> CONSTRAINT "Bodenbedeckung__BoFlaeche_pk" PRIMARY KEY (OGC_FID) )
>> ERROR:  relation "Bodenbedeckung__BoFlaeche" already exists
>>
>> ERROR 1: Terminating translation prematurely after failed
>> translation of layer Bodenbedeckung__BoFlaeche
>> -----------------------
>>
>> I know that this table already exists, but why is it trying to recreate
>> it
>> if I specify update and append?
>
> Andreas,
>
> This is because ogr2ogr does not find the existing table as a layer,
> presumably because it is not listed in the GEOMETRY_COLUMNS table as
> is expected for geometry based tables.
>
>> * ili file required?
>> In Interlis, the model is specified in the ili file and the data in the
>> itf file. My assumption is that the ili file is only necessary in the
>> case
>> when I need to create a new data model/table structure and not for
>> importing data into existing tables. Is this assumption wrong? When I
>> try
>> to omit the ili file, ogr2ogr crashes with the following error message:
>>
>> Segmentation fault (core dumped)
>
> I'm a bit fuzzy on this aspect.  Pirmin is the authority.
>
> But the crash seems like an unacceptable result, and I'd appreciate a bug
> report on it.
>
>> * temporary SQL files:
>> My assumption is that ogr2ogr somewhere creates temporary SQL files that
>> it is later feeding into PostgreSQL. Is that correct? Or is there a
>> direct
>> connection to the database and not temporary SQL file? If I can find
>> these
>> temporary SQL files I might be able to fix errors myself before loading
>> the SQL files into Postgis.
>
> It is done by directly submitting SQL statements to postgres through
> libpq.  There is no file on disk.
>



-- 
Andreas Neumann
Böschacherstrasse 6, CH-8624 Grüt/Gossau, Switzerland
Email: a.neumann at carto.net, Web:
* http://www.carto.net/ (Carto and SVG resources)
* http://www.carto.net/neumann/ (personal page)
* http://www.svgopen.org/ (SVG Open Conference)
* http://www.geofoto.ch/ (Georeferenced Photos of Switzerland)


-- 
Andreas Neumann
Böschacherstrasse 6, CH-8624 Grüt/Gossau, Switzerland
Email: a.neumann at carto.net, Web:
* http://www.carto.net/ (Carto and SVG resources)
* http://www.carto.net/neumann/ (personal page)
* http://www.svgopen.org/ (SVG Open Conference)
* http://www.geofoto.ch/ (Georeferenced Photos of Switzerland)




More information about the Gdal-dev mailing list