wiki:BuildingOgrPostNASDriver

Version 1 (modified by astrid.emde, 12 years ago) (diff)

--

Currently the NAS OGR driver lives in the opennas svn server, but it must be built as part of GDAL/OGR "trunk". The following rough steps should work on unix/linux, currently the win32 build support has not been implemented.

% svn checkout http://svn.osgeo.org/gdal/trunk/gdal
% cd gdal/ogr/ogrsf_frmts
% svn checkout https://svn.wheregroup.com/opennas/trunk/nas
% cd ../..
% ./configure --with-xerces
% make
% make install

The NAS driver depends on the Xerces-C XML parsing library. After configuring ensure the following lines appear in the final report:

  Xerces-C support:          yes
  NAS support:               yes

Also, confirm that NAS format shows up in the ogrinfo formats list;

% ogrinfo --formats |grep NAS
  -> "NAS" (readonly)

and try a simple file:

% ogrinfo 2008-02-21_4204_EINRICHTUNGSAUFTRAG_002.XML
Had to open data source read-only.
INFO: Open of `2008-02-21_4204_EINRICHTUNGSAUFTRAG_002.XML'
      using driver `NAS' successful.
1: AX_BesondereFlurstuecksgrenze
2: AX_Grenzpunkt
3: AX_LagebezeichnungOhneHausnummer
4: AX_LagebezeichnungMitHausnummer
5: AX_LagebezeichnungMitPseudonummer

% ogrinfo 2008-02-21_4204_EINRICHTUNGSAUFTRAG_002.XML AX_BesondereFlurstuecksgrenze
...
OGRFeature(AX_BesondereFlurstuecksgrenze):1
  beginnt (String) = 9999-01-01T00:00:00Z
  advStandardModell (String) = DLKM
  sonstigesModell (String) = NWABK5
  anlass (Integer) = 0
  artDerFlurstuecksgrenze (IntegerList) = (3:7106,3000,7003)
  LINESTRING (391514.74900000001071 5646678.007000000216067,391528.320000000006985 5646684.384999999776483)
...