Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change GeoBox constructor to accept shape
`Geobox(width, height, ...)` interface is problematic for several reasons: 1. not compatible with `ndarray`, where shape is used instead 2. no type-safety, easy to get order wrong 3. two parameters to configure single property Replacing `width, height` with a single parameter `shape`. This could be a simple `(int, int)` tuple for easier interop with `ndarray`. But one can choose to use more typesafe `XY[int]`. Example of the change at call site ```python # before change: GeoBox(512, 256, A, "espg:4326") # becomes ## if array order is "native" at call-site GeoBox((256, 512), A, "epsg:4326") ## if width/height orded is preferred GeoBox(ixy_(512, 256), A, "epsg:4326") ```
- Loading branch information
Showing
7 changed files
with
95 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.