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

It is not correct to detect the UTM zone by the first coordinate. #1

Open
winsento opened this issue Aug 16, 2020 · 1 comment
Open

Comments

@winsento
Copy link

It is not correct to detect the UTM zone by the first coordinate.
For example, the first point can be in one zone, and all geometry in another.

It is more correct to determine the geometry center of mass, and it is better to return all UTM zones in which the geometry is located, sorted by intersection area.

@perliedman
Copy link
Member

perliedman commented Aug 16, 2020

While I agree that the first point might seem simplistic and opens up for a lot of problems, I think if you have a geometry that spans more than one zone, you are going to end up with problems even if you you centroid/center of mass: parts of the geometry will still be outside the returned zone.

That is, if your geometry spans more than one zone, there simply is no well-defined answer to the question which zone it is in. Yes, we could traverse all coords and return all possible zones, but it would also be pretty easy to call the library like that if that's what you need. Another solution would maybe be throwing an error. That would however be a bad solution for our actual use case for this module, so it's not a change I'm keen on implementing.

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