-
Notifications
You must be signed in to change notification settings - Fork 85
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 support for reading and writing tiff gcps #460
Conversation
So, one thing that I don't really know how to handle is that the |
I'm not understanding why tests are failing... they pass locally and I didn't touch anything there afaics |
I was actually thinking about writing the GCP attributes in the |
The failures are unrelated:
Seems some dependency update broke things. I wouldn't worry about those for now. |
I think... 😄 I'm just not sure what to do of the x and y coord arrays, they will be totally unrelated to the gcp CRS |
I think it would be a good idea to not load them if in there are GCPs. This can be accomplished by setting |
Ok, I'm confused: to implement |
This is what I am thinking:
Side note: |
Ooooh, ok! I hadn't understood that |
With #461 merged you should be able to rebase from latest and have more tests passing. |
@snowman2 Ok, I think the writing of gcps with rasterio is now implemented. So that leaves the reprojection part, which I have no real clue how to do... |
It has a gcps kwarg: https://rasterio.readthedocs.io/en/latest/api/rasterio.warp.html#rasterio.warp.reproject Looks like you can just pass that in here: rioxarray/rioxarray/raster_array.py Line 423 in 2035170
|
This may also have to be accounted for ref |
Related: #370 |
Thanks a lot for the pointers! I think I got the reprojection to work now too. |
Perfect, I think that the initial logic looks pretty good. The next step is to make the CRS coordinate more generic as
|
Fixed! I see my changes are breaking the linting runs though, should I move some things out to a new module? |
Hmmm, it is getting long, but we're on the boundary here. For now, you can adjust the line length in the pylintrc file for now just enough to pass. If you feel motivated to think about how to better organized things, you are welcome to. |
I refactored a few lines, let's hope it helped |
Thanks for your patience and work on this @mraspaud 👍. Would you like to squash your commits or do you mind if I do it on merge? |
You can do it on the merge, no problem. But I see a bunch of tests failing? |
Strange thing is that tests are passing locally... do you know what this is about @snowman2 ? |
They should pass if you rebase from the master branch. |
Thanks @mraspaud 👍 |
Hmmm, I must have mixed up the failures with other failures. Looks like there may be some other things to check in previous versions of rasterio. I will open up a new issue to investigate. |
This PR adds support for reading and writing tiff ground control points
docs/history.rst
for all changes anddocs/rioxarray.rst
for new API