Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functionalities required to finalize documentation and generate API #352

Closed
35 tasks done
rhugonnet opened this issue Feb 14, 2023 · 0 comments · Fixed by #351
Closed
35 tasks done

Functionalities required to finalize documentation and generate API #352

rhugonnet opened this issue Feb 14, 2023 · 0 comments · Fixed by #351
Labels
documentation Improvements or additions to documentation enhancement Feature improvement or request

Comments

@rhugonnet
Copy link
Member

rhugonnet commented Feb 14, 2023

It looks like we are missing these functions:

  • Vector.save()
  • Vector.show()
  • Vector.__str__()
  • Vector.__repr__()

And these properties are not defined as such for the API:

  • Vector.ds,
  • All of additional SatelliteImage attributes,
  • Raster.crs and Raster.transform.

Also, looking at our geospatial tools, looks like we could add:

  • Vector.simplify() to simplify/degrade resolution of a Vector.
  • Make indexing [] possible with boolean ndarrays.
  • Allow to pass a Mask in Raster.set_mask(),
  • Make "in_value" and "target_value" attribute name consistent between polygonize and proximity.
  • Make equal_raster and georeferenced_grid_equal naming more consistent (start with equal for both?)
  • Automatically load data when calling arithmetic, logical or NumPy operation? (remove some load_data=True in the docs due to this)
  • Make show() plot on top of same ax by default.
  • Add clip option to Vector.crop().
  • A subsample wrapper function directly in the Raster class (allow to return coordinates).
  • Ensure support of Ufuncs through np.ufunc.reduce and other similar operations,
  • Rename cropGeom into crop_geom for consistency with other argument syntax,
  • Streamline main description of Raster and Vector methods and attributes,
  • Add tests for Mask logical operations and overloaded methods,
  • Change nodata from list to tuple (needs to be immutable as a property),
  • Add tests for untested functions (Raster.shift(), Raster.to_xarray(), etc),
  • Improve general test coverage, in particular checking warnings raised directly by GeoUtils.
  • Added as_array option to create_mask, as it nows returns a Mask by default. The shape is also always 2D to avoid the squeeze previously used everywhere.
  • Fixed loading multi-band raster explicitly after instantiation with load(), failed because of how out_shape was defined.

Bug found:

  • Maximum recursion depth calling np.ma.mean on a Raster.
  • In doc, array interface: isclose is returning a masked_array instead of Mask?
  • Cast from Mask to Raster does not work in Mask.proximity, need to modify Raster.from_array?
  • Fixed coords(grid=True): add more tests

Changed (need to add tests in the test suite):

  • Defined Raster.__repr__, modified __str__ to be consistent with NumPy,
  • Set load_data=False as default,
  • Loading data by default if stats=True is passed to Raster.info(),
  • Cast array to float automatically in get_nanarray(), otherwise was raising error,
  • Added overload for proximity and polygonize for Mask,
  • Changed default parameter of polygonize to "all".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement Feature improvement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant