Skip to content

EOmaps v3.5

Compare
Choose a tag to compare
@raphaelquast raphaelquast released this 13 Apr 22:30
· 2539 commits to master since this release
48fb42c

🚀 updates

⭐ EOmaps now properly handles encoded datasets!

  • This saves a lot of memory and provides a huge speedup when plotting integer-encoded datasets!
  • If you plot GeoTIFFs or NetCDFs with the functions Maps.read_data, Maps.from_file or m.new_layer_from_file, the data is now kept in the encoded dtype and conversions are only performed "on demand" (e.g. when adding colorbars or in pick-callbacks)
    • (if you really want to immediately convert all data-values, use mask_and_scale=True )
  • The encoding information can be get/set via m.data_specs.encoding or m.set_data_specs(encoding=...)
m = Maps()
m.set_data(data=[1,2,3], xcoord=[1,2,3], ycoord=[1,2,3], encoding=dict(scale_factor=0.01, add_offset=1))
# the "decoding" of the values is evaluated via   "add_offset" + "scale_factor" * x
# e.g.: in this case the actual data-values are :   [1.01, 1.02, 1.03]

🌳 New

  • ⭐ The colorbar can now be used as a dynamic shade indicator with m.add_colorbar(dynamic_shade_indicator=True)

    • it is dynamically updated based on the distribution of shaded pixels in the current field of view.
      (only possible with m.set_shape.shade_raster() or m.set_shape.shade_points() )
  • ⭐ There is now a way to use pick callbacks on datasets without plotting the data first.

    • To make a "pick-only" dataset, use m.set_data(...) to assign the dataset and then
      call m.make_dataset_pickable() to initialize all required information to make the dataset pickable.
    • This is useful if you want to indicate certain informations "on click" without plotting the data

⚙️ changes

  • The default plot-shape is now determined based on the size of the assigned dataset.
    • <500k datapoints: m.set_shape.ellipses()
    • >500k datapoints: m.set_shape.shade_raster()
  • Maps.from_file and m.new_layer_from_file now no longer attempt multiple shapes for plotting in case the first attempt fails
    (the default shape is used if no explicit shape-name is provided)

🔨 fixes

  • Fix typo in m.add_colorbar
  • Fix some typos in the docs
  • Fix unnecessary dtype conversions in "shade_raster" and "shade_points"
  • Avoid dtype conversions when reading NetCDFs and GeoTIFFs