Comments (6)
Hey eyal0, it seems that the intersection point in this example is non-integral.
i.e- the PoI is actually: (4700000, -2665584.787245271)
What should be ideally done when there is a non-integral PoI for examples like these?
I am interested in further solving this bug, please guide on how to go about it.
from geometry.
Just pick one of them but consistently. For example, do segment intersection in all 4 configurations and choose the result that has the lowest result.
from geometry.
I'm willing to solve this issue. So could you please point me to the file that I can look forward to for solving this issue?
from geometry.
I don't know which file. I'm not familiar with the boost code. :-( i think that it might be in the euclidean directory...?
from geometry.
Thanks - but it most probably is not so easy to fix, by just taking one file and make some edits. Besides that, the suggestion of doing segment intersection in all 4 configurations and taking the closest - will decrease performance by a factor 4 or so. We don't want that.
The user, if he uses integer coordinates as input, can ideally (that is the idea of the library, hope it works in this case) output the intersection point in floating point and then round himself as wished.
Alternatively, if the intersection point is indeed that mentioned floating point number, no matter of the order of calling, it actually should be rounded in the same way (which does not 4 calls) and that could be more easy to fix.
from geometry.
In the end, I did it with floating point and rounding. In floating point the result is different depending on the order of the segments but after rounding, the results were the same in the test case above.
There might be a case where even doing it in floating point and then rounding still gives two different answers. I'm not sure. I would guess probably yes.
from geometry.
Related Issues (20)
- Difference with rectilinear multipolygon with integer coordinates produces invalid polygon with disconnected interior
- sym_difference with rectilinear integer coordinate polygons produces wrong result.
- MSVC CI may not take effect HOT 2
- Mandate C++17 by default HOT 6
- union_ returns invalid polygon HOT 3
- Can't build with geometry.hpp in CLR project HOT 2
- Union producing self intersections after 1.78 HOT 3
- union_ perturbs a point and returns wrong result
- invalid intersection for CCW polygons HOT 3
- Wrong result in difference of linestrings
- buffer returns an invalid result HOT 1
- intersection returns an extra point in the output
- Combination of within and difference return wrong result
- within returns a wrong result with multi-linestrings
- static assertion failed: Not implemented for this Geometry's coordinate system HOT 1
- difference returns wrong results if double is the data type HOT 1
- Difference returns wrong result if hole touch the boundary of subtrahend HOT 2
- [Question] Get edges intersected with bounding boxes using boost::geometry::index::intersects HOT 2
- `boost::geometry::buffer()` of linestring returns inner polygon HOT 3
- Intersection gives incorrect result for polygon and line 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 geometry.