Skip to content

Commit 8663198

Browse files
committed
adjust precision
1 parent 4e1aa2c commit 8663198

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pycsw/core/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ def bbox_from_polygons(bboxs):
19951995
multi_pol = MultiPolygon(
19961996
[loads(bbox) for bbox in bboxs]
19971997
)
1998-
bstr = ",".join([f"{b:.2f}" for b in multi_pol.bounds])
1998+
bstr = ",".join([str(b) for b in multi_pol.bounds])
19991999
return util.bbox2wktpolygon(bstr)
20002000
except Exception as err:
20012001
raise RuntimeError('Cannot aggregate polygons: %s' % str(err)) from err

tests/unittests/test_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))",
4242
"POLYGON ((2 2, 2 3, 3 3, 3 2, 2 2))",
4343
],
44-
"POLYGON((0.00 0.00, 0.00 3.00, 3.00 3.00, 3.00 0.00, 0.00 0.00))"
44+
"POLYGON((0.0 0.0, 0.0 3.0, 3.0 3.0, 3.0 0.0, 0.0 0.0))"
4545
),
4646
])
4747
def test_bbox_from_polygons(bboxes, expected):

0 commit comments

Comments
 (0)