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

Add proj:shape and proj:transform to Planet output #39

Closed
cholmes opened this issue Jan 15, 2021 · 1 comment
Closed

Add proj:shape and proj:transform to Planet output #39

cholmes opened this issue Jan 15, 2021 · 1 comment

Comments

@cholmes
Copy link
Contributor

cholmes commented Jan 15, 2021

It'd be good to include the proj:shape and proj:transform fields in planet data output. Planet's columns plus origin_x and origin_y communiate the same information. I believe/hope we could get the shape and transform from those values (though how to do so is beyond me). If not then perhaps we could look at the planet data referenced, and/or I can work to get Planet to add it to their data api.

@cholmes cholmes added the planet label Jan 15, 2021
@matthewhanson
Copy link
Member

matthewhanson commented Jan 15, 2021

That is enough, along with the resolution to construct the affine transform. Since images are (almost always) north up, it simplifies to:
[ resolution, 0, origin_x, 0, -resolution, origin_y]

You'll notice in the S2 data (https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a-cogs/items/S2A_18SVF_20210115_0_L2A) there's actually 9 elements in the array (3x3 matrix) because it's accounting for 3 dimensions, but the last row is just "0 0 1". rasterio includes it when getting the transform via "src.transform"

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