Skip to content

stackstac.mosaic is not producing the desired output. #259

Answered by TomAugspurger
ddjustina asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, it was .apply, not .agg:

by_year = stack.groupby("time.year").apply(stackstac.mosaic, dim="time", nodata=0)
by_year.isel(y=slice(2000,3000), x=slice(2000, 3000)).compute().plot(col="year")

odc.stac's default behavior is to group by time and do this kind of mosaicing. This can be controlled with the groupby keyword.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@ddjustina
Comment options

@ddjustina
Comment options

@ddjustina
Comment options

@TomAugspurger
Comment options

Answer selected by ddjustina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants