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)
- Test errors on PowerPC: 85% tests passed, 16 tests failed out of 110 HOT 8
- Fails to build with abseil-20230125.3: /usr/local/include/absl/base/policy_checks.h:79:2: error: "C++ versions less than C++14 are not supported." HOT 2
- set_target_properties called with incorrect number of arguments HOT 1
- trouble generating cell ids for MultiPollygons
- Is there any method to calculate the ecef coord of the left-up corner of a specified cell id?
- ce8e338 breaks MSVC on Windows HOT 3
- Calculate S2 of polygon with OOM Error in golang HOT 2
- installion s2geometry on windows' issues HOT 18
- After installing s2geometry, CMakeLists.txt failed on "find_package(s2geometry REQUIRED)" HOT 3
- How to boost::serialize S2PointIndex HOT 5
- s2geometry.io has expired?? HOT 2
- problem with S2loop::init HOT 2
- 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
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.