-
Notifications
You must be signed in to change notification settings - Fork 472
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
cellToVertex result seems to be incorrect? #850
Comments
No, that seems right, plugging that index (after converting to hexadecimal) into @nrabinowitz 's Index inspector shows that the hexagon is right on the boundary in the pacific ocean where the coordinate system wraps from -180 to 180 degrees. (It's that tiny red dot; I had to zoom out quite a bit to get any land to even show up.) If you don't want to deal boundary crossing ranges like that in your work, you can move the boundary by adding 360 to any negative longitude so it goes from 0 to 360 and the wrap-around point is in ol' Londontown. ;) (But you can't completely avoid the wraparound of the coordinate system on the globe, it's going to happen somewhere.) |
So adding 360 to all of the negative numbers will move the wrap-around point such that you get contiguous numbers and an easy-to-calculate bbox (-179.something becomes 180.something when you add 360 to it). Some systems support -180 to 360 as the input specifically to make this kind of thing easier (probably by doing something like |
i want to get a cell's vertexes, so i use the cellToVertex, but the result seems to be incorrect, is my fault?
the h3index is: 604390566939066367, res 6
the result is :
p1 = {x=-179.98333732185461 y=31.292185279948786 z=0.0000000000000000 ...}
p2 = {x=-179.96420468386472 y=31.324612541714405 z=0.0000000000000000 ...}
p3 = {x=-179.98702792671048 y=31.354831946241418 z=0.0000000000000000 ...}
p4 = {x=179.97099726090215 y=31.352613250610126 z=0.0000000000000000 ...}
p5 = {x=179.95187736175254 y=31.320170609546317 z=0.0000000000000000 ...}
p6 = {x=179.97471951336996 y=31.289962044707188 z=0.0000000000000000 ...}
why the x(longitude) is 179 or -179? is it correct?
help me plz, thank you!
The text was updated successfully, but these errors were encountered: