scverse/spatialdata

Minor ergonomics/usability improvements

Opened this issue · 2 comments

Here is a container for small changes regarding ergonomics (Basel Hackathon).

  • The "spatial query" tutorial could be renamed for people who don't know what is a spatial query. Maybe something like "Spatial subsampling/query of the SpatialData object"?
  • In this same tutorial, an example can be shown with a polygon query from Napari (or, at least mentioning the Polygon can be extracted via Napari + add a link to the tutorial). Otherwise, users may not know how to make this Polygon, because they don't want to create it manually, right?
  • Rename the "Visualization" section to "Technology-specific" in the tutorials

I fully support this, the documentation for spatial query is inconsistent and incomplete.

Tutorial shows this:

cropped_sdata = sdata_ST8059050.query.bounding_box(
    axes=["x", "y"],
    min_coordinate=[bb_xmin, bb_ymin],
    max_coordinate=[bb_xmax, bb_ymax],
    target_coordinate_system="ST8059050",
)

cropped_sdata

But the query function is not documented. Image

Also,
https://spatialdata.scverse.org/en/stable/generated/spatialdata.bounding_box_query.html
is not currently working.. orImage

Hi @josenimo, thanks for your comment! Indeed, SpatialData.query is not documented

Regarding spatialdata.bounding_box_query, it is actually a function from spatialdata, not a method, so you should call it via spatialdata.bounding_box_query(sdata, ...) instead of sdata.bounding_box_query(...). Let me know if that works!