Skip to content

Commit 556795d

Browse files
committed
update changelog
1 parent ea34f2c commit 556795d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [NEXT] - TBD
9+
10+
### Fixed
11+
12+
* Fix issue with null bbox validation (author @bmschmidt, https://github.com/developmentseed/geojson-pydantic/pull/119)
13+
814
## [0.6.0] - 2023-05-09
915

1016
No change since 0.6.0a0

geojson_pydantic/features.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,22 @@ def check_bbox(cls, bbox: BBox) -> BBox:
3232
"""Check that bbox is valid."""
3333
if bbox is None:
3434
return bbox
35+
3536
if len(bbox) == 6:
3637
if bbox[0] > bbox[3] or bbox[1] > bbox[4] or bbox[2] > bbox[5]: # type: ignore
3738
raise ValueError(
3839
"BBox must be in the form [west, south, bottom, east, north, top]"
3940
)
41+
4042
elif len(bbox) == 4:
4143
if bbox[0] > bbox[2] or bbox[1] > bbox[3]:
4244
raise ValueError("BBox must be in the form [west, south, east, north]")
45+
4346
else:
4447
raise ValueError(
4548
"BBox must be in the form [west, south, east, north] or [west, south, bottom, east, north, top]"
4649
)
50+
4751
return bbox
4852

4953
@validator("geometry", pre=True, always=True)

0 commit comments

Comments
 (0)