Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pycsw/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def bbox2wktpolygon(bbox):
bbox = wktenvelope2bbox(bbox)
minx, miny, maxx, maxy = [f"{float(coord):.{precision}f}" for coord in bbox.split(",")]
wktGeometry = 'POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' \
% (minx, miny, minx, maxy, maxx, maxy, maxx, miny, minx, miny)
% (minx, miny, maxx, miny, maxx, maxy, minx, maxy, minx, miny)
return wktGeometry


Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))",
"POLYGON ((2 2, 2 3, 3 3, 3 2, 2 2))",
],
"POLYGON((0.00 0.00, 0.00 3.00, 3.00 3.00, 3.00 0.00, 0.00 0.00))"
"POLYGON((0.00 0.00, 3.00 0.00, 3.00 3.00, 0.00 3.00, 0.00 0.00))"
),
])
def test_bbox_from_polygons(bboxes, expected):
Expand Down
8 changes: 4 additions & 4 deletions tests/unittests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ def test_wkt2geom(wkt, bounds, expected):
@pytest.mark.parametrize("bbox, expected", [
(
"0.0, 10.0, 30.0, 15.0",
"POLYGON((0.00 10.00, 0.00 15.00, 30.00 15.00, "
"30.00 10.00, 0.00 10.00))"
"POLYGON((0.00 10.00, 30.00 10.00, 30.00 15.00, "
"0.00 15.00, 0.00 10.00))"
),
(
"-10.0, 10.0, 30.0, 15.0",
"POLYGON((-10.00 10.00, -10.00 15.00, 30.00 15.00, "
"30.00 10.00, -10.00 10.00))"
"POLYGON((-10.00 10.00, 30.00 10.00, 30.00 15.00, "
"-10.00 15.00, -10.00 10.00))"
)
])
def test_bbox2wktpolygon(bbox, expected):
Expand Down