-
Notifications
You must be signed in to change notification settings - Fork 189
Closed
Description
I created a regioncoverer from a rectangle as following:
var regionCoverer s2.RegionCoverer
regionCoverer.MaxCells = 10000
regionCoverer.MinLevel = 7
regionCoverer.MaxLevel = 7
topleft := s2.LatLngFromDegrees(72.0000064, -141.0000000)
topright := s2.LatLngFromDegrees(72.0000064, -55.6152420)
bottomleft := s2.LatLngFromDegrees(41.9017143, -141.0000000)
bottomright := s2.LatLngFromDegrees(41.9017143, -55.6152420)
rect = s2.Rect{}
rect = rect.AddPoint(bottomleft)
rect = rect.AddPoint(bottomright)
rect = rect.AddPoint(topright)
rect = rect.AddPoint(topleft)
covering := regionCoverer.Covering(s2.Region(rect))
The result is not 100% what I was expecting. A cellUnion of CellID's covering the whole rectangle should be the result but the small part of the rectangle that lies on a different face does not get any cellID's returned for it. I visualized all cell's in QGIS so that you can see what I mean:
The part where it looks like somebody took a bite out of it lies on a different face (face 4 vs. face 2).
Slightly lowering the bottomleft and bottomright latitude solves the problem.
Platzii, brechtvm and pcallewaert
Metadata
Metadata
Assignees
Labels
No labels