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

cleaning and error in the gdal file #916

Closed
wants to merge 2 commits into from
Closed

cleaning and error in the gdal file #916

wants to merge 2 commits into from

Conversation

12rambau
Copy link
Contributor

@12rambau 12rambau commented Aug 8, 2022

As I'm working on the creation of a rasterio provider I need to fully understand the gdal file. I have a lot of questions so I oppened this draft to notify you of my findings.

Please comment if something I post here is not making sense (I'll use the comment functionality of the PR to link code).

When I'll be done I'll remove the draft mode and I assume you'll squash my commits. What do you think ?

I think this was still working because most of the pixels have a square shape
if bottom is None:
bottom = bounds['ymin'] if width is None else top + width
bottom = bounds['ymin'] if height is None else top - height
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • and + where inverted as well. We agree that height is positive ?

Copy link
Member

Choose a reason for hiding this comment

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

width should be height in the bottom = line, but bottom > top depends on the coordinate system. I'll have to investigate further.

left if right is None else right,
top if bottom is None else bottom,
units)
pleft, ptop = self.toNativePixelCoordinates(left or right, top or bottom, units)
Copy link
Contributor Author

@12rambau 12rambau Aug 8, 2022

Choose a reason for hiding this comment

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

reduce complexity with nice use of the "or" keyword

Copy link
Member

Choose a reason for hiding this comment

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

None != 0, so this doesn't actually do the same thing. Specifically, this is if right is not specified, use left as a fall-back. You might want a 0 coordinate depending on the crs (e.g., it could be the prime meridian of your reference system).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry didn't thought about actual zero value (Flake8 would have complained anyway)

@manthey
Copy link
Member

manthey commented Aug 9, 2022

@12rambau Thanks for working on this.

@12rambau
Copy link
Contributor Author

12rambau commented Aug 11, 2022

self._getTileLock = threading.Lock()

what's the use of this lock ? It's never called in this file

@manthey
Copy link
Member

manthey commented Jun 16, 2023

This has been superceded by #1115.

@manthey manthey closed this Jun 16, 2023
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.

2 participants