Skip to content

Commit ea469b9

Browse files
author
nicolasK
committed
fix(to_wkt for GeometryManager)
1 parent ff4bc9a commit ea469b9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [0.0.6] -
88

9-
### Changed
9+
### Fixed
10+
11+
- `to_wkt`for GeometryManager.
12+
13+
### Added
1014

1115
- Add docstring thanks to @piclem.
16+
- Token support thanks to @luisageo6.
1217

1318
## [0.0.5] - 2024-02-19
1419

earthdaily/earthdatastore/cube_utils/geometry_manager.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ def to_intersects(self, crs="EPSG:4326"):
1515
][0]["geometry"]
1616

1717
def to_wkt(self, crs="EPSG:4326"):
18-
list(self._obj.to_crs(crs=crs).to_wkt()["geometry"])
19-
18+
wkts = list(self._obj.to_crs(crs=crs).to_wkt()["geometry"])
19+
return wkts[0] if len(wkts)==1 else wkts
20+
2021
def to_json(self, crs="EPSG:4326"):
2122
return json.loads(self._obj.to_crs(crs=crs).to_json(drop_id=True))
2223

0 commit comments

Comments
 (0)