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

How to subset an ImageCollection using a shapefile of an area? #28

Closed
surajitdb opened this issue Sep 24, 2021 · 2 comments
Closed

How to subset an ImageCollection using a shapefile of an area? #28

surajitdb opened this issue Sep 24, 2021 · 2 comments

Comments

@surajitdb
Copy link

Hi, though wxee serves the purpose of subsetting using a rectangular grid or a country, I am wondering if there is any provision for subsetting using a shapefile of an area like the way we can run on GEE platform using an asset in the form of shapefile file.

Thanking you.

@aazuspan
Copy link
Owner

Yes, that will work. Just load your GEE asset as a ee.Feature or ee.FeatureCollection and use it like any other geometry.

Something like

# Load an uploaded shapefile asset as a FeatureCollection
my_feature = ee.FeatureCollection("users/aazuspan/fires/mtbs_1984_2018")
# Get the geometry of the first feature
region = my_feature.first().geometry()

@surajitdb
Copy link
Author

Thank you so much @aazuspan for the prompt response to my query. Yes, it worked.

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

No branches or pull requests

2 participants