Repository: DOV-Vlaanderen/pydov

Issue:
Missing fields in Sondering and documentation (mv_mtaw and sondeernummer)
The return field ‘mv_mtaw’ does not exist for CPT
The return field ‘sondeernummer’ exists but isn't mentioned in the documentation



Discussion:

Patch:
diff --git a/docs/output_fields.rst b/docs/output_fields.rst
index 4f95915..6f4412e 100644
--- a/docs/output_fields.rst
+++ b/docs/output_fields.rst
@@ -181,8 +181,10 @@ CPT measurements (sonderingen)
 
     Field,Cost,Datatype,Example
     pkey_sondering,1,string,https://www.dov.vlaanderen.be/data/sondering/2002-010317
+    sondeernummer,1,string,GEO-02/079-S3
     x,1,float,142767
     y,1,float,221907
+    mv_mtaw,10,float,NaN
     start_sondering_mtaw,1,float,2.39
     diepte_sondering_van,1,float,0
     diepte_sondering_tot,1,float,16
diff --git a/pydov/types/sondering.py b/pydov/types/sondering.py
index eaa3250..9945948 100644
--- a/pydov/types/sondering.py
+++ b/pydov/types/sondering.py
@@ -62,6 +62,12 @@ class Sondering(AbstractDovType):
                  datatype='string'),
         WfsField(name='x', source_field='X_mL72', datatype='float'),
         WfsField(name='y', source_field='Y_mL72', datatype='float'),
+        XmlField(name='mv_mtaw',
+                 source_xpath='/sondering/sondeerpositie/'
+                              'oorspronkelijk_maaiveld/waarde',
+                 definition='Maaiveldhoogte in mTAW op dag dat de sondering '
+                            'uitgevoerd werd.',
+                 datatype='float'),
         WfsField(name='start_sondering_mtaw', source_field='Z_mTAW',
                  datatype='float'),
         WfsField(name='diepte_sondering_van', source_field='diepte_van_m',


Test patch:
diff --git a/tests/test_search_sondering.py b/tests/test_search_sondering.py
index 342dbb4..560fa70 100644
--- a/tests/test_search_sondering.py
+++ b/tests/test_search_sondering.py
@@ -39,7 +39,7 @@ class TestSonderingSearch(AbstractTestSearch):
     valid_returnfields_extra = ('pkey_sondering', 'conus')
 
     df_default_columns = [
-        'pkey_sondering', 'sondeernummer', 'x', 'y',
+        'pkey_sondering', 'sondeernummer', 'x', 'y', 'mv_mtaw',
         'start_sondering_mtaw', 'diepte_sondering_van',
         'diepte_sondering_tot', 'datum_aanvang', 'uitvoerder',
         'sondeermethode', 'apparaat', 'datum_gw_meting',
diff --git a/tests/test_types_sondering.py b/tests/test_types_sondering.py
index 3b09bc7..7bce6f8 100644
--- a/tests/test_types_sondering.py
+++ b/tests/test_types_sondering.py
@@ -17,7 +17,7 @@ class TestSondering(AbstractTestTypes):
     pkey_base = build_dov_url('data/sondering/')
 
     field_names = [
-        'pkey_sondering', 'sondeernummer', 'x', 'y',
+        'pkey_sondering', 'sondeernummer', 'x', 'y', 'mv_mtaw',
         'start_sondering_mtaw', 'diepte_sondering_van',
         'diepte_sondering_tot', 'datum_aanvang', 'uitvoerder',
         'sondeermethode', 'apparaat', 'datum_gw_meting',
@@ -25,7 +25,7 @@ class TestSondering(AbstractTestTypes):
     field_names_subtypes = [
         'lengte', 'diepte', 'qc', 'Qt', 'fs', 'u', 'i']
     field_names_nosubtypes = [
-        'pkey_sondering', 'sondeernummer', 'x', 'y',
+        'pkey_sondering', 'sondeernummer', 'x', 'y', 'mv_mtaw',
         'start_sondering_mtaw', 'diepte_sondering_van',
         'diepte_sondering_tot', 'datum_aanvang', 'uitvoerder',
         'sondeermethode', 'apparaat', 'datum_gw_meting',