Comments (6)
Either looking at the bounding box or the area would have shown that the loop was inverted / something had gone wrong with polygon construction.
I'm a bit confused how the loop could be inverted, since loop.Normalize()
is called.
from s2geometry.
What's the underlying problem you're trying to solve? Usually getting a constant-level covering is only good for quick hacks, and a range of levels should be used.
How much memory do you expect it to take? What's the area of the polygon divided by the average level-13 cell area?
You might also try covering the rect bound of the polygon and seeing if that also runs out of memory.
from s2geometry.
What's the underlying problem you're trying to solve? Usually getting a constant-level covering is only good for quick hacks
this is a very small part of a more complex use case that I tried to isolate for bug report
How much memory do you expect it to take? What's the area of the polygon divided by the average level-13 cell area?
I expect close to nothing :) I actually do this for many other polygons, with comparable or bigger area, and it cost nothing.
The fact that the initial candidates are 6 cells (so I guess the entire planet) is really weird and I think this is the root problem
from s2geometry.
from s2geometry.
My first guess would be that your polygon is inverted so it's effectively trying to cover most of the world with L13 cells.
…
On Mon, Feb 5, 2024 at 8:16 AM troussel @.> wrote: What's the underlying problem you're trying to solve? Usually getting a constant-level covering is only good for quick hacks this is a very small part of a more complex use case that I tried to isolate for bug report How much memory do you expect it to take? What's the area of the polygon divided by the average level-13 cell area? I expect close to nothing :) I actually do this for many other polygons, with comparable or bigger area, and it cost nothing. The fact that the initial candidates are 6 cells (so I guess the entire planet) is really weird and I think this is the root problem — Reply to this email directly, view it on GitHub <#350 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGEMKVV5L4XDXFXQEQGB43YSDZTNAVCNFSM6AAAAABC2IOXZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRXGIZTCMRVGM . You are receiving this because you are subscribed to this thread.Message ID: @.>
Thank you it look like this is it. I reversed the coordinates before initializing the loop, and indeed the issue disappear, and the general behavior of my system look sane
I was aware of this orientation issue, but since it works with every other examples I think I don't get the fundamental. By reversing the coordinates list before constructing the loop, I would expect that other cases where my code was working before, would suddenly be an issue because they would now cover the planet. But that's not the case so I feel clueless right now.
Anyway thanks !
from s2geometry.
Either looking at the bounding box or the area would have shown that the loop was inverted / something had gone wrong with polygon construction.
I'm a bit confused how the loop could be inverted, since
loop.Normalize()
is called.
yes indeed thanks. In the end I changed the intermediate step to construct polygon, so I can use the "smallest" loop based on their bounding box
from s2geometry.
Related Issues (20)
- Failed tests with -flto=auto HOT 14
- Citation for academic work HOT 1
- Can there be a new release cut? HOT 4
- Does s2 work on i586? HOT 2
- S2Builder adding extra points to overlapping polygons HOT 4
- ssl certificate error on https://s2geometry.io/
- Array out of bound warning. HOT 1
- s2builderutil_lax_polygon_layer_test/googletest: build fails on Ubuntu 22.04 HOT 6
- s2loop_test: Build fails with recent versions of abseil HOT 6
- Building tests fails due to google::S2_DEBUG_MODE unknown HOT 3
- encoded_s2point_vector_test fails to build with recent abseil HOT 2
- OSS-Fuzz issue 68498 HOT 2
- Get the exterior of cell union HOT 2
- Intersection of polygon borders HOT 7
- build fail with error on Ubuntu20.04 HOT 7
- loop.Normalize() not working as expected? HOT 7
- novice installation S2geometry on Windows issues HOT 3
- Linking examples fails because of missing abseil libs HOT 2
- Python test suite failure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from s2geometry.