We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide the following when reporting an issue:
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "coordinates": [ [ 120.179402, 31.247428 ], [ 120.700497, 31.365937 ] ], "type": "LineString" } }, { "type": "Feature", "properties": {}, "geometry": { "coordinates": [ [ 120.445638, 31.381745, 0 ], [ 121.033588, 31.055778, 0 ], [ 121.094159, 31.046175, 0 ], [ 121.167627, 31.042088, 0 ] ], "type": "LineString" } }, { "type": "Feature", "properties": {}, "geometry": { "coordinates": [ 120.539991319355,31.32943431295146 ], "type": "Point" } } ] }
I use turf.lineIntersect method to get the intersection of the two line, i got result is
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[120.539991319355,31.32943431295146]}}]}
the result seems not match in geojson.io ..
const line1 = [ [120.179402, 31.247428, 0], [120.700497, 31.365937, 0] ] const line2 = [ [120.445638, 31.381745, 0], [121.033588, 31.055778, 0], [121.094159, 31.046175, 0], [121.167627, 31.042088, 0] ] const point = intesection(line1, line2) console.log(JSON.stringify(point)); function intesection(lineString1, lineString2) { const line1 = turf.lineString(lineString1) const line2 = turf.lineString(lineString2) var intersects = turf.lineIntersect(line1, line2); return intersects }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please provide the following when reporting an issue:
https://geojson.io/
I use turf.lineIntersect method to get the intersection of the two line,
i got result is
the result seems not match in geojson.io ..
The text was updated successfully, but these errors were encountered: