[NAS] problem when importing atkis nas data into postgres

Ralf Suhr Ralf.Suhr at itc-halle.de
Mon Jul 12 04:48:12 EDT 2010


Hallo Armin,

nicht alle Importtabellen haben zwingend eine Geometrie, z.B. ax_strasse. 
Vielleicht ist es gar kein Fehler. Zum Überprüfen kannst du in die XML Datei 
schauen, ob eine Geometrie enthalten ist.

Am Montag 12 Juli 2010, 10:29:26 schrieb Armin Retterath:
> hello list,
> 
> after compiling again the import was done. i can't find the problem -
> maybe some missing dev packages or the temporal *.resolved.gml and
> *.gfs files which ogr2ogr writes could not be overwritten in a secondary
> import process.
> 
> (installed packages ubuntu 10.04:
> postgresql-server-dev-8.4
> libxerces-c2-dev
> libexpat1-dev
> expat
> libproj-dev
> libgeos-dev
> )
> 
> further problem:
> 
> the objects are now in the database, but their geometry type is
> GEOMETRY - maybe a problem with postgis 1.5?
> 
> regards armin
> 
> Am Freitag 09 Juli 2010, um 15:56:49 schrieb Frank Warmerdam:
> > Armin Retterath wrote:
> > > hello list,
> > > 
> > > we tested the import functions with real atkis demo data. a
> 
> problem
> 
> > > occured while import: the structure was generated, but the
> 
> elements
> 
> > > was not imported. the datatype in geometry_columns was
> 
> GEOMETRY -
> 
> > > which qgis doesn't know and may be erroneous.
> > > maybe s.o. can help.
> 
> > > we put the demo data into following place:
> http://www.geoportal.rlp.de/metadata/32370000_5590000_32380000_5600000.xm
> 
> > > l
> > > 
> > > download per wget or curl - don't click on the url ;-)
> > > 
> > > test system was ubuntu 10.04
> > > postgres 8.4
> > > postgis 1.5
> > > gdal_trunk from today
> > > 
> > > command from shell:
> > > 
> > > ./ogr2ogr -f "PostgreSQL" PG:"dbname=atkis1nas
> > > user=mapbender_user host=localhost port=5433
> > > password=mapbender_user" -a_srs EPSG:25832
> > > 32370000_5590000_32380000_5600000.xml
> > 
> > Armin,
> > 
> > I have tried a similar load command with the file you reference with
> 
> good
> 
> > success. In particular the command I used was:
> >   ogr2ogr -update PG:dbname=nas -a_srs EPSG:25832
> > 
> > 32370000_5590000_32380000_5600000.xml
> > 
> > The result appears to be a full set of populated layers, reported by
> > ogrinfo as:
> > 
> > INFO: Open of `PG:dbname=nas'
> > 
> >        using driver `PostgreSQL' successful.
> > 
> > 1: ax_historischesbauwerkoderhistorischeeinrichtung (Line String)
> > 2: ax_flugverkehr (Polygon)
> > 3: ax_einrichtungenfuerdenschiffsverkehr (Point)
> > 4: ax_ortslage (Polygon)
> > 5: ax_kommunalesgebiet (Polygon)
> > 6: ax_bauwerkimgewaesserbereich (Line String)
> > 7: ax_strassenachse (Line String)
> > 8: ax_platz (Polygon)
> > 9: ax_leitung (Line String)
> > 10: ax_unlandvegetationsloseflaeche (Polygon)
> > 11: ax_flaechebesondererfunktionalerpraegung (Polygon)
> > 12: ax_gehoelz (Polygon)
> > 13: ax_bahnverkehr (Polygon)
> > 14: ax_bauwerkoderanlagefuersportfreizeitunderholung (Polygon)
> > 15: ax_gewaesserachse (Line String)
> > 16: ax_wohnbauflaeche (Polygon)
> > 17: ax_wasserspiegelhoehe (Point)
> > 18: ax_bahnverkehrsanlage
> > 19: ax_schifffahrtsliniefaehrverkehr (Line String)
> > 20: ax_nullpunkt (Point)
> > 21: ax_abschnitt (Line String)
> > 22: ax_sonstigesbauwerkodersonstigeeinrichtung
> > 23: ax_gewaessermerkmal (Point)
> > 24: ax_friedhof (Polygon)
> > 25: ax_wasserlauf
> > 26: ax_strasse
> > 27: ax_wegpfadsteig (Line String)
> > 28: ax_hoehleneingang (Point)
> > 29: ax_naturumweltoderbodenschutzrecht
> > 30: ax_landwirtschaft (Polygon)
> > 31: ax_flaechezurzeitunbestimmbar (Polygon)
> > 32: ax_fliessgewaesser (Polygon)
> > 33: ax_netzknoten
> > 34: ax_bauwerkimverkehrsbereich
> > 35: ax_sportfreizeitunderholungsflaeche (Polygon)
> > 36: ax_industrieundgewerbeflaeche (Polygon)
> > 37: ax_strassenverkehr (Polygon)
> > 38: ax_turm (Point)
> > 39: ax_bahnstrecke (Line String)
> > 40: ax_gebietsgrenze (Line String)
> > 41: ax_fahrwegachse (Line String)
> > 42: ax_transportanlage (Point)
> > 43: ax_tagebaugrubesteinbruch (Polygon)
> > 44: ax_vegetationsmerkmal
> > 45: ax_gebaeude (Point)
> > 46: ax_strassenverkehrsanlage (Point)
> > 47: ax_flaechegemischternutzung (Polygon)
> > 48: ax_gewaesserstationierungsachse (Line String)
> > 49: ax_wald (Polygon)
> > 50: ax_denkmalschutzrecht (Point)
> > 51: ax_ast (Line String)
> > 52: ax_wohnplatz (Point)
> > 53: ax_bauwerkoderanlagefuerindustrieundgewerbe (Point)
> > 54: ax_fahrbahnachse (Line String)
> > 55: alkis_beziehungen
> > 56: ax_stehendesgewaesser (Polygon)
> > 
> > Of the above, only those with no geometry type in brackets are
> 
> declared
> 
> > as "GEOMETRY" in the GEOMETRY_COLUMNS table and this is because
> 
> they
> 
> > contain a mix of geometry types or no geometries at all.  Hmm, on
> > examination all the ones I looked at have no geometries and were
> > represented in the original NAS file as "None" geometry type.  It
> > might be nice to preserve this interpretation in Postgis - a failing
> > of the OGR PostGIS driver.
> > 
> > I'm not sure why you had problems, though you might try using
> > -update instead of -f PostgreSQL to indicate loading into an
> > existing database (making sure it is clean to start).
> > 
> > Sorry to not respond in German, but all my knowledge of German is
> > built on translate.google.com.  :-)
> > 
> > Best regards,

Mit freundlichen Grüßen,
gez. i.A. Ralf Suhr

--
Dipl.Ing.(FH) Ralf Suhr
Team Softwareentwicklung / Kompetenzzentrum Geo-Systeme
Telefon: +49 345 581 7127
Telefax: +49 345 581 787127
E-Mail: Ralf.Suhr at itc-halle.de


IT_Consult Halle GmbH
Bornknechtstraße 5
06108 Halle (Saale)

Eingetragen beim Amtsgericht
Stendal Handelsregister B
Nr. HRB-212984

Geschäftsführung:
Herr Axel von der Heyde
Herr Jörg Siebenhüner

Internet: http://www.itc-halle.de