Eomaps

Latest version: v8.2.1

Safety actively analyzes 641024 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 15

4.4.1

A quick bugfix release
🔨 Fixes
- fix providing kwargs to WebMap services (time, styles etc.)

----

4.4

A release that introduces 2 new functionalities: `m.add_line`, `m.cb.move` and the ability to use **keypress-modifiers** for callbacks!

🌳 New
🚲 A new method to quickly draw paths on a map!
- ⭐ `m.add_line()`: connect points via geodesic (or straight) lines!
- specify number of intermediate points per line-segment
- (alternatively) specify distance between intermediate points for each line-segment
- checkout the new [🚲 example](https://eomaps.readthedocs.io/en/dev/EOmaps_examples.html#lines-and-annotations) and the corresponding section in the [📖 documentation!](https://eomaps.readthedocs.io/en/dev/api.html#lines)

<img src="https://github.com/raphaelquast/EOmaps/blob/dev/docs/_static/example_lines.png?raw=true" width=75%/>

🛸 New features for callbacks!

👾 Keypress-modifiers

It is now possible to assign multiple callbacks to **the same** mouse-button and use keyboard-shortcuts
to switch between the assigned callbacks!
(e.g. the callback will only be executed if the corresponding button is pressed on the keyboard)


- 🌟 simply provide the modifier of choice with the `modifier=...` argument!
- e.g.: `m.cb.click.attach.annotate(modifier="a")` : this callback will only be executed if the `"a"` key is pressed
- 🌟 You can make modifiers "sticky" (e.g. to keep them activated after the button is released) by using:
- `m.cb.click.set_sticky_modifiers("a", "b", "c")`
- "sticky modifiers" are assigned separately for `click`, `pick` and `move` callbacks
- to release a "sticky modifier" press `ctrl + <modifier key>` or `escape`

- checkout the corresponding section in the [📖 documentation!](https://eomaps.readthedocs.io/en/dev/api.html#using-modifiers-for-pick-click-and-move-callbacks)


⭐ `move` callbacks

There's now an explicit container to attach callbacks that are executed
**on mouse movement if NO button is clicked**

- NOTE: use `m.cb.click.attach...` to execute callbacks on mouse-movement if a button is clicked!
- and set `on_motion=False` to avoid executing the click-callback on mouse-movements

python
m = Maps()
m.add_feature.preset.coastline()
m.cb.move.attach.annotate()
m.cb.move.attach.mark(modifier=1, radius=2, radius_crs=4326, fc="none", ec="r")


🌦️ Changes
- ❗ `m.cb.click.attach.mark()` now uses `permanent=False` by default

- 🏞️ NaturalEarth features have been updated

<details>
<summary> click for a list of new features</summary>

python

{
10m_cultural: {'admin_0_countries_iso', 'parks_and_protected_lands', 'admin_0_countries_tlc'}
10m_physical: {'bathymetry_G_4000', 'graticules_20', 'bathymetry_K_200', 'bathymetry_E_6000', 'graticules_1', 'bathymetry_A_10000', 'bathymetry_F_5000', 'bathymetry_C_8000', 'bathymetry_B_9000', 'bathymetry_L_0', 'bathymetry_H_3000', 'bathymetry_I_2000', 'wgs84_bounding_box', 'bathymetry_J_1000', 'graticules_5', 'bathymetry_D_7000', 'graticules_30', 'graticules_10', 'graticules_15'}
110m_physical: {'graticules_15', 'graticules_20', 'graticules_1', 'wgs84_bounding_box', 'graticules_5', 'graticules_30', 'graticules_10'}
50m_physical: {'graticules_20', 'graticules_1', 'wgs84_bounding_box', 'graticules_5', 'graticules_30', 'graticules_10', 'graticules_15'}
}



</details>


🔨 Fixes
- fix sharing boundary and inset-marker properties for inset-maps
- fix issues with invalid clipping shapes
- fix issues with geometries that cannot be exploded
- make sure temporary artists are cleared prior to executing callbacks
- fix issues with dynamically updated legends and temporary artists
- fix error when trying to update colorbar-arrows without a colorbar
- avoid re-fetching WebMap tiles if extent remains the same
- fix unnecessary re-draws of artists after overlay-actions

4.3

A new release that brings some nice updates and an awesome new **Layout-Editor**!

🌦️ Changes
- 🍃 utility-widgets now **auto-update** themselves if new layers are added to the map!
- to show only a subset of the available layers, use `m.util.layer_selector(layers=["layer1", ...])`
- 🍃 coastlines are no longer added by default when creating new layers from files (e.g. NetCDF, GeoTIFF etc.)
- (use `coastlines=True` or explicitly call `m.add_feature.preset.coastline()` to add coastlines!)
- 🍃 `m.add_gdf` now allows using a `path` to a file that can be read with `geopandas.read_file` instead of providing the `geopandas.GeoDataFrame` directly
- ❗ keyword-arguments for `m.new_inset_map` have changed!
- `edgecolor` and `linewidth` are depreciated and will be removed in next major versions!
- to set the properties of the boundary-polygon, use `m.new_inset_map(boundary=dict(fc="r", lw=1)` instead
- ❗ `m.cb.dynamic` has been removed
🌳 New

⭐ New accessor for classification schemes
The new classification-schemes accessor 🌟 `m.set_classify` provides **autocompletion** and proper **docstrings**!
(you can use it just as you would use `m.set_classify_specs`)

Just select the scheme you want to use and call it with the relevant parameters:
python
m = Maps()
m.set_data(...)
m.set_classify.Quantiles(k=5)
m.plot_map(...)

alternative (old) way to set the classification:
m.set_classify_specs(scheme="Quantiles", k=5)



⭐ There's a new [🏗️ Layout Editor](https://eomaps.readthedocs.io/en/latest/api.html#layout-editor) to quickly re-arrange the subplots of a figure!
<img src=https://user-images.githubusercontent.com/22773387/176476897-119658ca-0882-4880-a906-7af787887a3d.gif width=65%>

The **Layout Editor** can be used to quickly re-arrange the position of all axes in the figure.
(works for maps, colorbars, inset-maps, ordinary matplotlib plots etc.)
- You can save and re-apply a layout with:
- 🌟`m.get_layout()`: get the current layout (or dump the layout as a json-file)
- 🌟`m.apply_layout()`: apply a given layout (or load and apply the layout from a json-file)
- 🌟`m.edit_layout(filepath=...)`: enter LayoutEditor and (optionally) save layout as a json-file on exit

To quickly enter/exit Layout Editor, simply use the assigned keyboard-shortcuts:
- press `ALT + L` to enter the **LayoutEditor** mode
- press `ALT + L` again or `escape` to exit the **LayoutEditor**

Have a look at the new section in the [📖 documentation](https://eomaps.readthedocs.io/en/latest/api.html#layout-editor) for more details!

🔨 Fixes
- fix recognizing the parent layer when initializing utility-widgets from the parent Maps object
- fix layer-selectors should indicate no active layer if the active layer is not part of the widget
- updates for inset-maps
- add fix for reprojection issues with certain projections
- fix reprojection sometimes masks certain shapes

4.2.3

A minor bugfix release.

🌳 new
- there is now an option to completely disable extension arrows when adding a colorbar
(e.g. with `m.add_colorbar(add_extend_arrows=False)`)

- it is now possible to set the "layer" of an inset-map on initialization (e.g. `m.new_inset_map(layer="adsf")`
(by default, the `"all"` layer is used for inset-maps!)

🔨 fixes
- fix using alpha-transparency with wms and wmts services (e.g. `m.add_wms.<service>.add_layer.<layer>(alpha=0.5)`)
- fix colors of histogram-bins if the bins extend over more than one colorbar-split
- fix position of colorbar extension-arrows after using `m.subplots_adjust`
- fix appearance of "vertical" colorbar extension arrows

4.2.2

A minor bugfix release.

🌳 new
- To address issues when plotting **2D raster-data** with **unsorted coordinates**, there is now an option
to force sorting the data by coordinates prior to plotting with `m.plot_map(assume_sorted=False)`
- only works if coordinates are provided as 1D arrays and the data is provided as a 2D array
- sorting is only relevant for `raster` and `shade_raster` shapes (other shapes don't require sorting)
- by default no sorting is performed!
🌦️ changes
- The pick-radius used to identify clicked pixels can now be set in 2 ways `m.plot_map(pick_distance=...)`:
- if a number is provided, it is used as a multiplier for the dataset-radius
e.g. `pick-radius = pick_distance * radius_in_plot_crs`)
- if a string is provided, it is directly used as the pick-radius in units of the plot_crs
e.g. `pick-radius = float(pick_distance)`
🔨 fixes
- ❗ fix using "pick" callbacks with `m.set_shape.raster()` and 2D input-coordinates
- make radius-estimation more robust (fallback to nearest-neighbor if 2D estimation fails)
- fallback to `np.inf` for pick_distance if radius estimation fails
- fix delaunay_triangulation does not need to estimate the radius if masked=False
- fix issues with registering pandas

4.2.1

A bugfix release that greatly reduces import time!

🌦️ changes
- 🕐 greatly reduced "plain" import-time
- "heavy" modules such as 'datashader', 'xarray' etc. are now lazily imported only when needed
- this reduces runtime of `from eomaps import Maps` in a fresh terminal from ~5sec to ~1sec
- 🍃 `m.add_marker(...)` now supports the "layer" kwarg
- 🍃 `m.show()` now automatically calls `plt.show()` to actually draw the figure if matplotlib is in non-interactive mode

🔨 fixes
- legends for WebMap services are now updated based on the visible layer
- `m.add_marker` now only draws newly added markers (instead of updating all dynamic artists)
- avoid using `pkg_resources` to identify package-version (use explicit `_version.py` instead)

Page 8 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.