Skip to content

Commit

Permalink
fix(to_wkt for GeometryManager)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasK committed Feb 22, 2024
1 parent ff4bc9a commit ea469b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.0.6] -

### Changed
### Fixed

- `to_wkt`for GeometryManager.

### Added

- Add docstring thanks to @piclem.
- Token support thanks to @luisageo6.

## [0.0.5] - 2024-02-19

Expand Down
5 changes: 3 additions & 2 deletions earthdaily/earthdatastore/cube_utils/geometry_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ def to_intersects(self, crs="EPSG:4326"):
][0]["geometry"]

def to_wkt(self, crs="EPSG:4326"):
list(self._obj.to_crs(crs=crs).to_wkt()["geometry"])

wkts = list(self._obj.to_crs(crs=crs).to_wkt()["geometry"])
return wkts[0] if len(wkts)==1 else wkts

def to_json(self, crs="EPSG:4326"):
return json.loads(self._obj.to_crs(crs=crs).to_json(drop_id=True))

Expand Down

0 comments on commit ea469b9

Please sign in to comment.