EOmaps v5.3
A minor release with a lot of bugfixes and some nice improvements
❗ Changes
Classifications of NaturalEarth features into scale-categories have been depreciated to simplify the interface.
(the old syntax is still functional but will be removed in future releases)
-
m.add_feature.cultural_10m.urban_areas()
$\rightarrow$ m.add_feature.cultural.urban_areas(scale=10)
-
m.add_feature.physical_50m.coastline()
$\rightarrow$ m.add_feature.physical.coastline(scale=50)
-
m.add_feature.physical_110m.coastline()
$\rightarrow$ m.add_feature.physical.coastline(scale=110)
🌳 New
-
using
m.plot_map(vmin=..., vmax=...)
now respects the encoding of the data (if applicable)
(e.g. values are provided as actual data values and internally converted to respect the data-encoding) -
✏️ drawing-capabilities have been re-worked to get rid of performance issues.
-
🧭 The compass (or North-arrow) implementation has been re-worked
- The last known valid angle is used if compass is placed at a position where the angle could not be determined
- Use
c.set_ignore_invalid_angles(True)
to ignore warnings if angle could not be determined - It is now possible to add a compass to a specific layer with
m.add_compass(layer=...)
- If you pick the compass with the mouse, it can be resized by simultaneously turning the mouse-wheel
-
The interface for 🌵 NaturalEarth features has been improved and simplified
- Features are now only grouped by category and the scale is provided as argument
m.add_feature.physical_10m.coastline
$\rightarrow$ m.add_feature.physcial.coastline(scale=10)
- If the provided scale is not available, the next available scale is used!
- By default, all features determine the appropriate scale automatically and are added via cartopy's feature-interface.
- To get a
geopandas.GeoDataFrame
containing all geometries and metadata of a feature, usem.add_feature.physcial.coastline.get_gdf(scale=10)
- To get a
- Features are now only grouped by category and the scale is provided as argument
-
Maps
-objects can now be used as context-managers to free memory when the object is no longer needed.
(particularly useful to render video-frames etc.)# Maps-objects can be used as context-managers to free memory after usage with Maps(...) as m: ... # this also works for new layers on existing maps! m = Maps() with m.new_layer("my_layer") as m2: ...
minor (non-breaking) changes
-
annotations now use the picked color as edgecolor by default. (use
m.cb.click.attach.annotate(bbox=dict(ec="k"))
to get the initial behaviour, e.g. a black edgecolor) -
if a picker is used with
m.add_gdf
, the picked value is obtained from the column assigned viacolumn=...
by default. You can override this by usingval_key=...
🔨 Fixes
- Fix dragging the companion-widget on Linux
- Avoid re-drawing on savefig if dpi settings did not change
- Improve cleanup methods
- Fix activating the Layout-manager if no artists are present
- Fix finishing draw-events if multiple drawers are present
- Fix performance issues with the drawer
- Avoid updating the figure on move-events without move callbacks
- Don't use defaultdicts for callback-containers
- Fix setting vmin and vmax with encoded data
- Fix caching of wms-layers in the companion-widget
- Avoid using defaultdicts
- Indicate if the compass rotation-angle is invalid
- Fix "cartopy" based GeoDataFrame reprojections
- Fix clearing outdated cached layers
- Avoid setting map-extent when adding markers
- Fix setting the clip-path for WebMap services on non-rectangular axes
- Use preset-styles in Companion-widget when adding preset-features
- fix lazy import of mapclassify
- fix re-positioning of webmap legends
- fix fetching values from geo-data-frames