v1.1.0 Release
v1.1.0 Release
What's Changed
Several major updates were made to the main files of maup
__init__.py
- Moved the source for the import of "make_valid" from .repair to shapely since a better version of this function now exists in Shapely 2.0.
adjacencies.py
- Added an option to the "adjacencies" function to output the result as a
GeoDataFrame instead of a GeoSeries. - Made an adjustment to the "adjacencies" function to handle the case when there are
no adjacencies. (Thanks to Hazel Brenner for suggesting the solution included here.
indexed_geometries.py:
-
Removed the lines defining "geometry.index" for each individual geometry because
geometries are now immutable. -
Updated syntax for STRtree queries to accommodate new behavior in Shapely 2.0.
intersections.py:
- Added an option to the "intersections" function to output the result as a
GeoDataFrame instead of a GeoSeries.
Default value is "geoseries" to replicate prior behavior.
repair.py:
-
Changed "type(x)" to "x.geom_type" to accommodate new behavior in Shapely 2.0.
-
Replaced "buffer(0)" with "make_valid" throughout.
-
Modified the "autorepair", "remove_repeated_vertices", "snap_to_grid", and
"count_overlaps" functions so that the input may be either a GeoSeries or a
GeoDataFrame. (Previous versions required a GeoDataFrame.) -
Added a "count_holes" function analogous to "count_overlaps".
-
Removed the "make_valid" function since a better version of this function is
now available in Shapely 2.0. -
Added "index_parts=False" option to the "explode" function occurring inside the
definition of the "expand_to" function to accommodate a FutureWarning in
geopandas. -
Modified the "doctor" function so that it gives a complete report of invalid
geometries, overlaps, and gaps without throwing up an error if it encounters
any of these, and also so that the input may be either a GeoSeries or a GeoDataFrame. -
Modified the "dedup_vertices" and "snap_polygon_to_grid" functions to work
correctly in the case that the input polygon is not simply connected.
Tests
- Most of the tests have been updated to account for the changes to the maup package.
Full Changelog: v1.0.7...v1.1.0