#turfjs — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #turfjs, aggregated by home.social.
-
-
The base map is from 1:10m #NaturalEarth. Map rendering is via the browser using #D3js and #GIMP for compiling the GIF animation.
The Sun position calculation is adapted from #Wikipedia and #Turfjs is used to generate the terminator line from the Sun’s position.
https://en.wikipedia.org/wiki/Position_of_the_sun
https://en.wikipedia.org/wiki/Equation_of_time🧵 2/2
-
The base map is from 1:10m #NaturalEarth. Map rendering is via the browser using #D3js and #GIMP for compiling the GIF animation.
The Sun position calculation is adapted from #Wikipedia and #Turfjs is used to generate the terminator line from the Sun’s position.
https://en.wikipedia.org/wiki/Position_of_the_sun
https://en.wikipedia.org/wiki/Equation_of_time🧵 2/2
-
The base map is from 1:10m #NaturalEarth. Map rendering is via the browser using #D3js and #GIMP for compiling the GIF animation.
The Sun position calculation is adapted from #Wikipedia and #Turfjs is used to generate the terminator line from the Sun’s position.
https://en.wikipedia.org/wiki/Position_of_the_sun
https://en.wikipedia.org/wiki/Equation_of_time🧵 2/2
-
The base map is from 1:10m #NaturalEarth. Map rendering is via the browser using #D3js and #GIMP for compiling the GIF animation.
The Sun position calculation is adapted from #Wikipedia and #Turfjs is used to generate the terminator line from the Sun’s position.
https://en.wikipedia.org/wiki/Position_of_the_sun
https://en.wikipedia.org/wiki/Equation_of_time🧵 2/2
-
The base map is from 1:10m #NaturalEarth. Map rendering is via the browser using #D3js and #GIMP for compiling the GIF animation.
The Sun position calculation is adapted from #Wikipedia and #Turfjs is used to generate the terminator line from the Sun’s position.
https://en.wikipedia.org/wiki/Position_of_the_sun
https://en.wikipedia.org/wiki/Equation_of_time🧵 2/2
-
This uses #TurfJs polygon length function to calculate its circumference. The underlying sorting of the coordinates uses polar coordinates, since that is how they are being randomly generated. By first sorting over the degrees and the distances.
For most instances this is a pretty good estimate, though in some case a self-intersecting polygon can be created, which hints that there is a more optimized polygon.
Further this problem is a typical 'travelling salesman problem' which can be solved via various algorithms.
Though before considering such optimization issues, there is the main question if the randomly generated POI is even accessible to the public.
In the case one is a pedestrian, one could use #overpass to gather information if any #OpenStreetMap highways exist in the proximity to the POI and then find the one that is the closest and permissive to pedestrians. Then move the POI to that location.
This example only works if there is enough #OSM data at the location.
-
Toying around with the idea of creating a random POI generator which can be used as a #StarCourse or an optimization challenge to navigate throughout the POIs.
This tool is required for the #SagaOfTheRuckers navigator challenge.
Tools: #TurfJs #Leaflet #OpenStreetMap #WebDev
-
Wow, I just submitted a pull request for Turf. That hasn't happened for a long time.
-
For those who use the Turf.js JavaScript library for GIS/mapping work. Turf 7.2.0 has been released, which fixes a lot of edge case bugs by replacing their `polygon-clippling` dependency with `polyclip-ts`.
-
The Bing ML buildings data is from this GitHub repo and first released in 2022: https://github.com/microsoft/IdMyPhBuildingFootprints
I used the following tools/services:
▪︎ @geofabrik for the OSM buildings
▪︎ #OverpassTurbo for extracting clipping polygons from OSM
▪︎ Osmosis for filtering the OSM buildings
▪︎ @qgis #QGIS for GeoJSON clipping and data conversion
▪︎ A couple of hand-coded Perl scripts for data manipulation
▪︎ #TurfJS
▪︎ #LeafletJS for rendering
▪︎ H3 for hexbinning
▪︎ @GIMP #GIMP for final map prep🧵 3/4
-
I was helping an #UrbanPlanning friend with some spatial analysis with #QGIS but the project seemed to be running out of her 8GB memory.
I advised a #FrameworkLaptop with more memory. She got the DIY option, which lead her to consider her OS choice, which lead her try #Linux (#Ubuntu), which is what she installed after testing it.
Now we'll get back on track using #QGIS / #Docker / #Valhalla / #TurfJS to explore some spatial analysis ideas.
-
I've now published a write-up and the source code for how I calculated a connectivity rank which could be used to help prioritize how a bike network is built out based how segments would improve connections with the existing network.
https://mark.stosberg.com/bike-network-connectivity-rank/?ref=mastodon
Thanks to all the open source mapping projects that helped make this possible, including #qgis #valhalla #josm and #turfjs. And yes, I used JavaScript for this.
Feedback, improvements welcome!
-
Currently waiting on my old laptop to merge 3,476 isochrone polygons into a single MultiPolygon, 🤞 that it doesn't crash part way through.
#turfjs does crash in cases like this, so I'm using `polyclip-ts`.
Another project I'd like to get to is submitting a pull request to the Turf.js project to switch to using polyclip-ts internally, so it doens't crash either. Discussion about this spread across a few issues. One of them is here:
https://github.com/Turfjs/turf/issues/2409#issuecomment-1662873720
1,500 polygons left to merge...🧵
-
🧵 Downgrading @turf/boolean-intersects to 6.5.0 appears to resolve the issue. Perhaps if I have time I can circle back later and see about a patch to fix that regression.
https://github.com/Turfjs/turf/issues/2585#issuecomment-2207850688
#turfjs 🧵
-
@samfirke @spatialThinkLab I can't confirm. I can't videos from the 2023 conference at least.
Besides the source code I linked above, I also have a blog post about sidewalk priority mapping:
https://mark.stosberg.com/how-to-create-a-heatmap-sidewalk-location-priority/
-
v3.0 of my "Walk Potential" software has been released. This an #UrbanPlanning #mapping tool used in planning to quantify the number of "interesting" places nearby to walk. Useful metric for demand to fix sidewalk network gaps.
Release notes: https://gitlab.com/markstos/walk-potential/-/releases/v3.0.0
Docs: https://gitlab.com/markstos/walk-potential/-/blob/main/README.md
First reply with a boundary polygon for their city wins free Walk Potential analysis for that city.
#gis #BloomingtonIN #OpenStreetMap #OpenTripPlanner #TurfJS
Example Walk Potential Heatmap:
-
And here's the list of my heavily used data tools!
General use tools
Web scraping tools
1. #p-queue
2. #cheerio
3. #puppeteerGeospatial tools
1. #mapshaper
2. #turfjs
3. #qgisWebsite tools
1. #sveltekit
Tools that are also companies
1. @observablehq
2. #Github actions
3. #netlify -
Note to future self:
Use more #turfjs. It’s friggin' awesome!
Question to past self:
Why haven’t you been using more #turfjs? (https://chringel.dev/2022/09/06/0943/)