Skip to content

Add large area utilities notebook#409

Open
furkan-bacak wants to merge 2 commits intomasterfrom
sh-large-area-utilities
Open

Add large area utilities notebook#409
furkan-bacak wants to merge 2 commits intomasterfrom
sh-large-area-utilities

Conversation

@furkan-bacak
Copy link
Copy Markdown

Summary

This PR adds a notebook based on the large area utilities example and adapts it for the planetlabs/notebooks repo.

What’s included

  • a notebook that shows how to split large AOIs into manageable bounding boxes
  • updated notebook title and markdown to better align with current Planet style
  • light content adaptation from the original sentinelhub-py example for notebook-repo use

Context

The intention is to use this notebook in the repo first and then link to it from docs.planet.com.

@matthew-ballard
Copy link
Copy Markdown
Contributor

I would put this one into the workflows section - because it's not about an applied use case. It's more about steps or tools somebody might need to accomplish a task - which seems like a workflow. Kind of arbitrary, but it's the best categorization we could come up with

Copy link
Copy Markdown
Contributor

@matthew-ballard matthew-ballard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - thanks for publishing this! I have a few comments:

  1. "Open in Colab" won't work very well because you've added the Hawaii.json file in a folder, rather than inline. The way we set up Colab only uses the ipynb file itself. Options are to remove Colab link or put geojson into ipynb cell.
  2. In the introduction, it would be good to give context for where this is relevant to, i.e. Processing and Statistical APIs.
  3. In the second "optional" imports section - it seems like these are required to complete the notebook. If they, I would add them to install the Docker workflow. Alternatively, use a pattern to show geospatial data from another notebook, such using just using geopandas. I would recommend this option to keep it simpler with fewer unnecessary packages. Also not sure if the imagery basemap is adding useful context. Could do something like this (and this would need to be applied to subsequent uses)
def show_area(area_shape):
    # 1. Wrap the shape in a GeoSeries (a simple GeoPandas object)
    # This automatically handles Polygons and MultiPolygons
    gs = gpd.GeoSeries([area_shape])

    # 2. Plot it directly
    fig, ax = plt.subplots(figsize=(8, 8))
    gs.plot(ax=ax, facecolor='red', edgecolor='black', alpha=0.6)

    # Clean up the look
    ax.set_title("Area of Interest")
    ax.set_xlabel("Longitude")
    ax.set_ylabel("Latitude")
    plt.grid(True, linestyle='--', alpha=0.5)
    
    plt.show()

show_area(hawaii_area)
  1. I recommend updating the year in the NDVI example to be more recent imagery to something more recent than 2022.
  2. For the NDVI evalscript, it might be nice to show a multi-temporal evalscript that removes the clouds by taking a median value, for example
  3. there are some line that have ruff that I think can be removed, e.g. # ruff: noqa: C901, unless this is being used some how?
  4. It would be helpful to have a bit of an outline up at the top for each of the options that are being used (regular grid, OSM, etc.). It would make it easier to navigate the notebook.

@willrayeo
Copy link
Copy Markdown
Contributor

On Matt's points:

  1. Alternatively, you can call the geojson as a string in the notebook.
  2. I can help with adding some context for you Furkan
  3. A more recent year sounds like a good idea
  4. I would argue we keep it as is, just because a multitemporal request will use more processing units when a customer may use the notebook. Let's not needlessly batter their quota!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants