Skip to content

Commit 81e7121

Browse files
committed
Fix bug in geometry serialization, locn:Geometry -> locn:geometry
1 parent 616090c commit 81e7121

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

ckanext/dcat/profiles/euro_dcat_ap_scheming.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def _graph_from_dataset_v2_scheming(self, dataset_dict, dataset_ref):
272272
self.g.add((spatial_ref, SKOS.prefLabel, Literal(item["text"])))
273273

274274
for field in [
275-
("geom", LOCN.Geometry),
275+
("geom", LOCN.geometry),
276276
("bbox", DCAT.bbox),
277277
("centroid", DCAT.centroid),
278278
]:

ckanext/dcat/tests/profiles/dcat_ap_2/test_scheming_support.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ def test_e2e_ckan_to_dcat(self):
264264
g, spatial[0][2], SKOS.prefLabel, dataset["spatial_coverage"][0]["text"]
265265
)
266266

267-
assert len([t for t in g.triples((spatial[0][2], LOCN.Geometry, None))]) == 1
267+
assert len([t for t in g.triples((spatial[0][2], LOCN.geometry, None))]) == 1
268268
# Geometry in WKT
269269
wkt_geom = wkt.dumps(dataset["spatial_coverage"][0]["geom"], decimals=4)
270-
assert self._triple(g, spatial[0][2], LOCN.Geometry, wkt_geom, GSP.wktLiteral)
270+
assert self._triple(g, spatial[0][2], LOCN.geometry, wkt_geom, GSP.wktLiteral)
271271

272272
# Test qualified relation
273273
relation = [t for t in g.triples((dataset_ref, DCAT.qualifiedRelation, None))]

ckanext/dcat/tests/profiles/dcat_ap_3/test_euro_dcatap_3_profile_serialize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ def test_e2e_ckan_to_dcat(self):
239239
g, spatial[0][2], SKOS.prefLabel, dataset["spatial_coverage"][0]["text"]
240240
)
241241

242-
assert len([t for t in g.triples((spatial[0][2], LOCN.Geometry, None))]) == 1
242+
assert len([t for t in g.triples((spatial[0][2], LOCN.geometry, None))]) == 1
243243
# Geometry in WKT
244244
wkt_geom = wkt.dumps(dataset["spatial_coverage"][0]["geom"], decimals=4)
245-
assert self._triple(g, spatial[0][2], LOCN.Geometry, wkt_geom, GSP.wktLiteral)
245+
assert self._triple(g, spatial[0][2], LOCN.geometry, wkt_geom, GSP.wktLiteral)
246246

247247
distribution_ref = self._triple(g, dataset_ref, DCAT.distribution, None)[2]
248248
resource = dataset_dict["resources"][0]

ckanext/dcat/tests/profiles/dcat_us_3/test_dcat_us_3_profile_serialize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ def test_e2e_ckan_to_dcat(self):
260260
g, spatial[0][2], SKOS.prefLabel, dataset["spatial_coverage"][0]["text"]
261261
)
262262

263-
assert len([t for t in g.triples((spatial[0][2], LOCN.Geometry, None))]) == 1
263+
assert len([t for t in g.triples((spatial[0][2], LOCN.geometry, None))]) == 1
264264
# Geometry in WKT
265265
wkt_geom = wkt.dumps(dataset["spatial_coverage"][0]["geom"], decimals=4)
266-
assert self._triple(g, spatial[0][2], LOCN.Geometry, wkt_geom, GSP.wktLiteral)
266+
assert self._triple(g, spatial[0][2], LOCN.geometry, wkt_geom, GSP.wktLiteral)
267267

268268
# Alternate identifiers
269269
ids = []

0 commit comments

Comments
 (0)