gdal icon indicating copy to clipboard operation
gdal copied to clipboard

NAS ignores sometimes the art-value HNR

Open MD-KreisUnna opened this issue 4 years ago • 1 comments

I'm using ogr2ogr (3.2.2) to import all the NAS data from the Kreis Unna into a PostgreSQL-DB (13.3.1 with PostGIS 3.1.1, standard in debian 11). We have more than 100.000 HNR (house numbers).

Objects are like:

<wfs:Insert>
	<AP_PTO gml:id="DENW12AL00000IB2">
		<gml:identifier codeSpace="http://www.adv-online.de/">urn:adv:oid:DENW12AL00000IB2</gml:identifier>
		<lebenszeitintervall>
			<AA_Lebenszeitintervall>
				<beginnt>2012-10-02T12:27:06Z</beginnt>
			</AA_Lebenszeitintervall>
		</lebenszeitintervall>
		<modellart>
			<AA_Modellart>
				<advStandardModell>DKKM1000</advStandardModell>
			</AA_Modellart>
		</modellart>
		<modellart>
			<AA_Modellart>
				<advStandardModell>DKKM500</advStandardModell>
			</AA_Modellart>
		</modellart>
		<anlass>000000</anlass>
		<position>
			<gml:Point gml:id="A23LX">
				<gml:pos>415386.052 5706552.984</gml:pos>
			</gml:Point>
		</position>
		<schriftinhalt>1a</schriftinhalt>
		<fontSperrung>0.0</fontSperrung>
		<skalierung>1.000</skalierung>
		<horizontaleAusrichtung>zentrisch</horizontaleAusrichtung>
		<vertikaleAusrichtung>Basis</vertikaleAusrichtung>
		<signaturnummer>8124</signaturnummer>
		<art>HNR</art>
		<drehwinkel uom="urn:adv:uom:rad">0.6168515</drehwinkel>
		<dientZurDarstellungVon xlink:href="urn:adv:oid:DENW12AL00000Kdu"/>
	</AP_PTO>
</wfs:Insert>

During import round about 75% of these HNR are imported without setting the ap_pto attribute art to 'HNR'. The value is ' '. So the issue is that we dont can identify this type as a HNR. Because their are some other kind of text without a correct art attribute we cant fix the problem in other ways.

The complete installation is a debian 11 standard-installation (Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux) installed with apt-get using

  • postgresql with postgis
  • gdal-bin

I use the program with the options: export GML_FIELDTYPES=ALWAYS_STRING export OGR_SETFIELD_NUMERIC_WARNING=ON export PGCLIENTENCODING=UTF8 ogr2ogr -nlt CONVERT_TO_LINEAR -ds_transaction -f "PostgreSQL" -append "PG:"..." -a_srs EOSG:25832 file.xml

Regards Michael

MD-KreisUnna avatar Oct 25 '21 12:10 MD-KreisUnna

Also include NAS_GFS_TEMPLATE. See https://gdal.org/drivers/vector/nas.html

jef-n avatar Oct 25 '21 12:10 jef-n