Comments (3)
I'm not sure if I've got the best answer but I think this might be a projection issue.
If you modify the map to display the data in a non-projected manner using L.CRS.Simple
then you don't see any little gaps.
var map = L.map('map', {
crs: L.CRS.Simple,
center: [0, 0],
zoom: 3,
maxZoom: 20
});
Thinking about it mathematically I would also expect an intersection point at [0.5, -0.5]
on a segment between [0, 0], [1, -1]
.
So I think this is one of those quirks when data is presented when with projections.
Make sense?
from sweepline-intersections.
Yeah I understand ... 😕 I think it would be to much work to include a CRS option?
from sweepline-intersections.
So if you run the analysis with the coords in WebMercator then no intersections will be returned, as per what you're expecting visually.
I don't think it's this libraries job to project coordinates for you, you're better off using proj4 or @turf/projection for that.
eg
{
"type": "MultiPolygon",
"coordinates": [
[
[
[
0.0,
0.0
],
[
111319.490793273565941,
-111325.142866385082016
],
[
222638.981586547131883,
222684.208505544025684
],
[
0.0,
0.0
]
],
[
[
33395.847237982066872,
33395.999833380206837
],
[
66791.694475964133744,
66792.915264250957989
],
[
55659.745396636782971,
-55660.451865421520779
],
[
33395.847237982066872,
33395.999833380206837
]
]
]
]
}
from sweepline-intersections.
Related Issues (5)
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 sweepline-intersections.