Ticket #9 (closed defect: fixed)

Opened 13 years ago

Last modified 13 years ago

verschiedene Feldformate fuer 'lage'

Reported by: frank.jaeger Owned by:
Priority: major Milestone: 0.6 release
Component: ogr Version: 0.5
Keywords: lage,Straßenschlüssel Cc: astrid.emde, warmerdam@…


Das Feld "lage" enthält den Straßenschlüssel oder auch den Schlüssel von Bahnstrecken und ähnlichen.

In 4 Tabellen hat dies Feld 3 unterschiedliche Formate. Dadurch wird die Verbindung (JOIN) der Tabellen erschwert.


  • character varying(5)
  • Inhalt mit führenden Nullen


  • character varying (5)
  • Inhalt ohne führende Nullen

ax_lagebezeichnungmithausnummer.lage und ax_lagebezeichnungmitpseudonummer.lage

  • integer
  • Wenn man das Feld in der Datenbank als "character varying(5)" anlegt, wird es von PostNAS nicht gefüllt.

Die Felder sollen in einem einheitlichen Format (char(5)) angelegt werden und einheitlich (mit führenden Nullen) gefüllt werden.

Change History

comment:1 Changed 13 years ago by astrid.emde

  • Cc astrid.emde, warmerdam@… added

comment:2 Changed 13 years ago by frank.jaeger

The column 'lage' is to be found in 4 tables but has 3 different formats.
Column 'lage' is the key for streets and routes like train.
Column 'lage' is used for joining the 4 tables. The different formats makes it difficult.


.. JOIN .. ON ax_lagebezeichnungohnehausnummer.lage = trim(leading '0' from ax_lagebezeichnungkatalogeintrag.lage)
.. JOIN .. ON to_char(ax_lagebezeichnungmithausnummer.lage, 'FM00000') = ax_lagebezeichnungkatalogeintrag.lage




  • character varying(5)
  • filled with leading zeroes


  • character varying (5)
  • without leading zeroes

ax_lagebezeichnungmithausnummer.lage und ax_lagebezeichnungmitpseudonummer.lage

  • integer
  • If defined as "character varying(5)" in the Database it isn't filled by PostNAS.

'lage' should have the same format in all tables for easy join: char(5) with leading zeroes.


This is the keytable (forein key) for the other tables. Streets (with House-Numbers) have only numeric keys. Train-Routes have "=" (Equal) in the first byte. Classifications for primary streets have character "K" in the first byte.


  • Land without a hause near a street.


  • Houses with house-number which references the keytable.

Only numeric (integer-like) keys appear because the cases with characters have no houses.


  • Other buildungs like a garage belonging to a house with a house-number.

Only numeric (integer-like) keys appear.

comment:3 Changed 13 years ago by warmerdam

  • Status changed from new to closed
  • Resolution set to fixed

Preferred formatting and field type implemented in the NASReader::SetFeatureProperty?() method (http://trac.osgeo.org/gdal/changeset/22336).

Note that existing .gfs files associated with NAS files need to be cleared away for this to have an effect on the schema.

comment:4 Changed 13 years ago by astrid.emde


  • I tested with gdal trunk from today 11.5.2011 (GDAL revision 22354)
Note: See TracTickets for help on using tickets.