Skip to content

Releases: tmillenaar/GridKit

v1.0.1

09 Jul 21:01
9dd4cfc

Choose a tag to compare

Fix intersects not properly evaluating the bottom of the tile

v1.0.0

29 Jun 16:29
751d3eb

Choose a tag to compare

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 DataTile class to replace BoundedGrid for representing rotated tiles.
  • count(), sum(), and mean() now also apply to data tiles.
  • TriGrid origin moved and size definition halved to better match RectGrid and HexGrid. 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_bounds option to doc_utils.plot_polygons() to allow disabling zooming to bounds.
  • Added io.raster_to_data_tile() for reading raster files as DataTiles.
  • io.write_raster() can now write both BoundedRectGrid and DataTile, as long as the DataTile is on a RectGrid.

Fixes

  • Adjusted example flower_of_life.py to work with Shapely 2.1.0.
  • Properly raise an error if BaseGrid.align_bounds() or BaseGrid.are_bounds_aligned() is called on a rotated grid (previously gave unreliable results).

Deprecations

  • Dropped support for Python 3.9.
  • Removed filled keyword argument from gridkit.doc_utils.plot_polygons() in favor of fill.

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, DataTile uses 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_multipolygon argument from BaseGrid.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 .geoms was always accessed when as_multipolygon=False. Making it explicit improves clarity.

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.py demonstrating Conway’s Game of Life.
  • Added example hexagonal_automata.py showcasing cellular automata on a hexagonal grid.

Misc

  • Moved BaseGrid.anchor to Rust.
  • Removed DeprecationWarning for flat HexGrids, as they are still useful for DataTile and bounded grid contexts.

v0.14.1

25 Dec 11:15
d3e0809

Choose a tag to compare

Features

  • Add arguments location and adjust_rotation to TriGrid.to_crs(), RectGrid.to_crs() and HexGrid.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

11 Aug 09:29
bb50b49

Choose a tag to compare

Merge pull request #92 from tmillenaar/tiles

Add Tiles class

v0.13.0

10 Jul 20:36
372b95d

Choose a tag to compare

Merge pull request #97 from tmillenaar/release_0.13.0

Add release notes for v0.13.0

v0.12.1

17 Jun 11:17
65cf067

Choose a tag to compare

Merge pull request #91 from tmillenaar/numpy_v2.0

Make numpy v2.0.0 compatible

V0.12.0

10 Jun 14:47
e6b5f74

Choose a tag to compare

Merge pull request #89 from tmillenaar/release_v0.12.0

Add release notes v0.12.0

v0.11.1

01 Jun 14:03
114a107

Choose a tag to compare

Merge pull request #87 from tmillenaar/anchor_corner

Anchor corner and add definition property

v0.11.0

29 May 17:41
b1ef856

Choose a tag to compare

Merge pull request #84 from tmillenaar/update_gitignore

Expand .gitignore with common files and folders related to build and …

v0.10.0

21 Apr 12:46
db0e286

Choose a tag to compare

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