Skip to content

Commit

Permalink
#147 adres toegevoegd aan Perceel
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasGe committed Jan 28, 2021
1 parent cbd4957 commit 2b4fa25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion crabpy/gateway/capakey.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def creator():
sectie,
res['capakey'],
Perceel.get_percid_from_capakey(res['capakey']),
res['adres'],
None,
None,
self._parse_centroid(res['geometry']['center']),
Expand Down Expand Up @@ -472,6 +473,7 @@ def creator():
),
res['capakey'],
Perceel.get_percid_from_capakey(res['capakey']),
res['adres'],
None,
None,
self._parse_centroid(res['geometry']['center']),
Expand Down Expand Up @@ -827,14 +829,15 @@ class Perceel(GatewayObject):
'''

def __init__(
self, id, sectie, capakey, percid,
self, id, sectie, capakey, percid, adres=None,
capatype=None, cashkey=None,
centroid=None, bounding_box=None,
shape=None, **kwargs
):
self.id = id
self.sectie = sectie
self.capakey = capakey
self.adres = adres
self.percid = percid
self._capatype = capatype
self._cashkey = cashkey
Expand Down
3 changes: 2 additions & 1 deletion tests/gateway/test_capakey.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class TestPerceel:
def test_fully_initialised(self):
p = Perceel(
'1154/02C000', Sectie('A', Afdeling(46013)),
'40613A1154/02C000', '40613_A_1154_C_000_02',
'40613A1154/02C000', ['Teststraat 10, 2000 Gemeente'], '40613_A_1154_C_000_02',
'capaty', 'cashkey',
(104893.06375, 196022.244094),
(104002.076625, 194168.3415, 105784.050875, 197876.146688)
Expand All @@ -364,6 +364,7 @@ def test_fully_initialised(self):
assert p.centroid == (104893.06375, 196022.244094)
assert p.bounding_box == (104002.076625, 194168.3415, 105784.050875, 197876.146688)
assert p.capakey == str(p)
assert p.adres == ['Teststraat 10, 2000 Gemeente']
assert ("Perceel('1154/02C000', Sectie('A', Afdeling(46013)), "
"'40613A1154/02C000', '40613_A_1154_C_000_02')" == repr(p))

Expand Down

0 comments on commit 2b4fa25

Please sign in to comment.