-
Notifications
You must be signed in to change notification settings - Fork 944
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
Clarify in convertLength documentation usage of degree and radian units #2203
Comments
I think the issue is subtracting the latitude won't give you the correct degree distance.
If your starting point was at [0, 0] for example instead of [-120.0, 47.0] it would work. |
This sounds like it wasn't an issue in the end? Closing but please reopen if it was a problem with convertLength. |
@smallsaucepan looks related to the recent #2638 and possibly the changes made in #2106? And a difference in how |
I wouldn't mind updating the docs if someone could explain the difference. |
This is working ok. The distance between two longitudes ( I've had in mind to add a "Units" page to the website for a while. Let's leave this open to be resolved by the addition of that page - including gotchas when using degrees and radians as units. |
Yes, @smallsaucepan the addition of Units docs is sufficient for me to close this. |
Working on a line grid module, copying from the
@turf/rectangle-grid
package, I stumbled upon this inconsistency. Is it possibleconvertLength
is off or am I missing something obvious here?The earth's curvature can't justify such big difference in a 1km distance.
The way the bbox's
width
is calculated above is the same logic used now (recently updated) in defining the rectangle/square grid features, but that should produce an incorrect grid result. Though I'm not sure those changes have been already published since the output of the square grid seems fine.@rowanwins any thoughts?
The text was updated successfully, but these errors were encountered: