does turf.intersect work for spatially querying more than 2 polygons OR what library OR workaround is recommended?
See original GitHub issueI have a GeoJSON of meshed/connected/neighboring polygons and want to onclick of a single polygon, select those polygons that interesect (a.k.a. border) the clicked polygon.
I was thinking of using turf.intersect
to do this. However, the docs only describe 2 polygons as being the arguments.
OR I think (if needed as a workaround using TurfJS) I could use turf.buffer
buffering the polygon centroid to select the neighboring polygons? turf.buffer
Hoping to get a nudge in the right direction here. I haven’t had luck finding my use case in open issues, GIS SE or SOflow. Any recommendations would be super appreciated.
- [1] GeoJSON data as a gist file.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Intersecting FeatureCollections in turf.js? - GIS Stack Exchange
Most files in the wild are FeatureCollections. An intersect that can only work with Polygons isn't terribly useful or maybe it's just me....
Read more >Advanced geospatial analysis - Turf.js
Takes one or more features and calculates the centroid using the mean of all vertices. This lessens the effect of small islands and...
Read more >How to intersect more than 2 polygons using Turf.js?
turf.intersect() can only intersect 2 polygons. If you want to intersect multiple polygons you can intersect each polygon with each other ...
Read more >Chapter 10 Bridges to GIS software | Geocomputation with R
You can interact with QGIS, SAGA, GRASS and gvSIG from system terminals and embedded CLIs, ... relational data models, topology and fast (spatial)...
Read more >Clip Data - QGIS Introduction - LibGuides at Duke University
Spatial Query : This tool will use 2 shapefiles to select features ... Click on the Raster menu, mouse-over Extraction, and click on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
GeoJSON writer is a tool I built to save compact GeoJSON to the file system, if your application is entirely web based, I wouldn’t be using that library.
Use that source code as a general guideline, try to extract some of the
rbush
components of it.I built that OSM Ottawa code for a very specific one of project, so there’s definitely some improvements to do.
@shawnmgoulet Well I have a pretty complex example from one of my public repos.
https://github.com/osmottawa/data-research/blob/master/Ottawa-Buildings/align-address.js
The data is not provided in the repo, however you can preview the data here.
What the script does:
Might be useful to look at the syntax