Releases: tmillenaar/GridKit
Releases · tmillenaar/GridKit
v1.0.1
v1.0.0
GridKit v1.0.0 Release Notes
This is the first major release of GridKit!
It contains several breaking changes. One of the most notable is the re-definition of the origin and cell size of the TriGrid.
If you are having trouble migrating, you might find inspiration by comparing the v0.14.1 examples to the v1.0.0 examples.
Features
- Introduced
DataTileclass to replaceBoundedGridfor representing rotated tiles. count(),sum(), andmean()now also apply to data tiles.TriGridorigin moved and size definition halved to better matchRectGridandHexGrid. See issue #94.- Added both flat and pointy versions of
TriGrid. - Fixed offset ordering for flat
HexGrids—now uses(x, y)instead of(y, x). - Added
set_zoom_to_boundsoption todoc_utils.plot_polygons()to allow disabling zooming to bounds. - Added
io.raster_to_data_tile()for reading raster files asDataTiles. io.write_raster()can now write bothBoundedRectGridandDataTile, as long as theDataTileis on aRectGrid.
Fixes
- Adjusted example
flower_of_life.pyto work with Shapely 2.1.0. - Properly raise an error if
BaseGrid.align_bounds()orBaseGrid.are_bounds_aligned()is called on a rotated grid (previously gave unreliable results).
Deprecations
- Dropped support for Python 3.9.
- Removed
filledkeyword argument fromgridkit.doc_utils.plot_polygons()in favor offill.
Future Deprecations
- All bounded grids (
BoundedTriGrid,BoundedRectGrid,BoundedHexGrid) will be deprecated in a future update.- Defining an area by its bounds becomes ambiguous when the grid is rotated.
DataTiles serve the same role, and support rotation via origin, width, and height.- Unlike the inheritance-based bounded grids,
DataTileuses composition, which might require an adjustment in approach. - To understand the difference, compare the Example Gallery from v1.0.0+ (using
DataTiles) with v0.14.1 or earlier (using bounded grids).
- The
as_multipolygonargument fromBaseGrid.to_shapely()will be removed.- It will always return a Shapely object; to get an iterable, use
.geoms. - Rationale:
to_shapely()already created a Shapely object, and.geomswas always accessed whenas_multipolygon=False. Making it explicit improves clarity.
- It will always return a Shapely object; to get an iterable, use
Documentation
- Documentation is now published for historical versions as well as the nightly “dev” version.
- A version selector drop-down is available in the bottom left of the docs.
- Updated the contributing guide to reflect documentation build changes.
- Replaced usage of bounded grids in examples with
DataTiles. - Added example
game_of_life.pydemonstrating Conway’s Game of Life. - Added example
hexagonal_automata.pyshowcasing cellular automata on a hexagonal grid.
Misc
- Moved
BaseGrid.anchorto Rust. - Removed
DeprecationWarningfor flatHexGrids, as they are still useful forDataTileand bounded grid contexts.
v0.14.1
Features
- Add arguments
locationandadjust_rotationtoTriGrid.to_crs(),RectGrid.to_crs()andHexGrid.to_crs()for more accurate conversions.
Misc
- Build using python3.9 because for 3.8 the geopandas/fiona documentation dependency installs incompatible versions
V0.14.0
Merge pull request #92 from tmillenaar/tiles Add Tiles class
v0.13.0
Merge pull request #97 from tmillenaar/release_0.13.0 Add release notes for v0.13.0
v0.12.1
Merge pull request #91 from tmillenaar/numpy_v2.0 Make numpy v2.0.0 compatible
V0.12.0
Merge pull request #89 from tmillenaar/release_v0.12.0 Add release notes v0.12.0
v0.11.1
Merge pull request #87 from tmillenaar/anchor_corner Anchor corner and add definition property
v0.11.0
Merge pull request #84 from tmillenaar/update_gitignore Expand .gitignore with common files and folders related to build and …
v0.10.0
Features
- Add GridIndex.sort()
- Allow plotting of RGB(A) values in doc_utils.plot_polygons
- Improve performance of doc_utils.plot_polygons
- Improve performance of initializing a new GridIndex if the supplied indices are already in an appropriate numpy integer ndarray.
Fixes
- Fix incorrect HexGrid.relative_neighbours and by extension BaseGrid.neighbours for HexGrid when supplying multiple grid indices at a time
Documentation
- Add example 2d_diff_hex_anim.py