Skip to content

Commit

Permalink
[NAS] Fix (and refactor) update operations for GID7
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Nov 1, 2023
1 parent 58b56fb commit 69337f3
Show file tree
Hide file tree
Showing 8 changed files with 355 additions and 567 deletions.
10 changes: 5 additions & 5 deletions autotest/ogr/ogr_nas.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_ogr_nas_1():
ds = ogr.Open("tmp/cache/BKG_NAS_Peine.xml")
assert ds is not None, "could not open dataset"

assert ds.GetLayerCount() == 41, "did not get expected layer count"
assert ds.GetLayerCount() == 40, "did not get expected layer count"

lyr = ds.GetLayerByName("AX_Wohnplatz")
feat = lyr.GetNextFeature()
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_ogr_nas_2():
with gdal.config_option("NAS_GFS_TEMPLATE", ""):
ds = ogr.Open("tmp/cache/gm2566-testdaten-gid60-2008-11-11.xml")

assert ds.GetLayerCount() == 85, "did not get expected layer count"
assert ds.GetLayerCount() == 84, "did not get expected layer count"

lyr = ds.GetLayerByName("AX_Flurstueck")

Expand Down Expand Up @@ -170,7 +170,7 @@ def test_ogr_nas_3():
with gdal.config_option("NAS_GFS_TEMPLATE", ""):
ds = ogr.Open("data/nas/empty_nas.xml")

assert ds.GetLayerCount() == 1, "did not get expected layer count"
assert ds.GetLayerCount() == 0, "did not get expected layer count"

ds = None

Expand All @@ -190,7 +190,7 @@ def test_ogr_nas_4():
with gdal.config_option("NAS_GFS_TEMPLATE", ""):
ds = ogr.Open("data/nas/delete_nas.xml")

assert ds.GetLayerCount() == 2, "did not get expected layer count"
assert ds.GetLayerCount() == 1, "did not get expected layer count"

del_lyr = ds.GetLayerByName("Delete")

Expand Down Expand Up @@ -233,7 +233,7 @@ def test_ogr_nas_5():
with gdal.config_option("NAS_GFS_TEMPLATE", ""):
ds = ogr.Open("data/nas/replace_nas.xml")

assert ds.GetLayerCount() == 3, "did not get expected layer count"
assert ds.GetLayerCount() == 2, "did not get expected layer count"

# Check the delete operation created for the replace

Expand Down
1 change: 1 addition & 0 deletions ogr/ogr_xerces_headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#include <xercesc/framework/MemoryManager.hpp>
#include <xercesc/sax/InputSource.hpp>
#include <xercesc/sax/Locator.hpp>
#include <xercesc/util/BinInputStream.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
#include <xercesc/util/PlatformUtils.hpp>
Expand Down
Loading

0 comments on commit 69337f3

Please sign in to comment.