Opened 12 years ago

Last modified 12 years ago

#4555 closed enhancement

NAS: better support for wfsext:Replace — at Version 1

Reported by: jef Owned by: warmerdam
Priority: normal Milestone: 1.10.0
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: nas
Cc: astrid_emde

Description (last modified by jef)

The attached patches improves support for NAS updates (NBA) in GDAL/OGR and PostNAS (unfortunately their TRAC seems to be readonly).

The patch assumes extends the virtual "delete" feature class with following fields:

  • context - that contains the context of the delete ('delete' or 'replace')
  • replacedBy - gml:id of the feature the phased out feature is replaced with
  • safeToIgnore - value of the corresponding wfsext::Replace attribute

The fields are collected when processing the "delete" layer. The patch also arranges that "delete" is always the last layer and therefore also is processed last by ogr2ogr.

There's also a small change to ParseGMLCoordinates() to workaround a common error in NAS data, where a single Z value is transported in a gml:pos element. The function now interprets those as 3D-Point (0,0,Z) and produces a warning instead of an error.

The postnas patch:

  • all feature classes get a 'endet' with the end date of deleted or replaced feature
  • the delete_feature function is now a trigger that is run on INSERT. It updates the "endet" field of phased out features (either with the current timestamp on 'delete' or with the 'beginnt' timestamp of the replacing feature) and also relies on the "identifier" field.
  • the manual updates to geometry_columns were replaces with calls to AddGeometryColumn() (for PostGIS 2.0; columns that contain more than one geometry type are now GEOMETRY)
  • the gml_id indices now also include "beginnt".
  • s/character varying/varchar/
  • "ax_punktortau" is now a 3D point (possibly other tables need to be updated, too)

ogr2ogr should now work without -skipfailures, if the data is correct.

Change History (2)

by jef, 12 years ago

Attachment: postnas.diff added

PostNAS 0.7 changes

comment:1 by jef, 12 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.