#TurfJS

2025-04-08

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.

#mathematics #maths

2025-04-08

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

A simple HTML form to generate random GPS way point list. It has the fields longitude and latitude for one's starting point. A POI count for the way point count. Maximum and minimum distances from the start point. It provides the list of random generated way point items and their bearing off of north 0°, their radius, and their GPS coordinates. Additionally a polygon is created that uses all the points and calculates its circumference. The way points and polygon are overlaid on a Leatlet instance of OpenStreetMap. The current location is Munich city.
Steve BennettSteveBennett
2025-01-15

Wow, I just submitted a pull request for Turf. That hasn't happened for a long time.

github.com/Turfjs/turf/pull/28

2025-01-06

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`.

github.com/Turfjs/turf/release

#JavaScript #Nodejs #TurfJS #Turf #GIS #Mapping

Eugene Alvin Villar 🇵🇭seav@en.osm.town
2024-11-11

The Bing ML buildings data is from this GitHub repo and first released in 2022: github.com/microsoft/IdMyPhBui

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

2024-10-18

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.

2024-07-05

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.

mark.stosberg.com/bike-network

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!

#mapping #spatialAnalysis #minneapolis

2024-07-04

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:

github.com/Turfjs/turf/issues/

1,500 polygons left to merge...🧵

2024-07-04

🧵 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.

github.com/Turfjs/turf/issues/

#turfjs 🧵

2024-03-20

@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:

mark.stosberg.com/how-to-creat

#OpenStreetMap #turfjs

2023-03-06

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: gitlab.com/markstos/walk-poten

Docs: gitlab.com/markstos/walk-poten

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:

Jeremia Kimelmanjeremiak@journa.host
2023-01-29

And here's the list of my heavily used data tools!

General use tools

1. #d3
2. #lodash

Web scraping tools

1. #p-queue
2. #cheerio
3. #puppeteer

Geospatial tools

1. #mapshaper
2. #turfjs
3. #qgis

Website tools

1. #sveltekit

Tools that are also companies

1. @observablehq
2. #Github actions
3. #netlify

Jeremia Kimelmanjeremiak@journa.host
2022-11-29

Wrote a TIL style post about turning a PNG into #GeoJSON.

The Forest Service publishes the results of their 10 hour dead fuel moisture model once a day as a PNG file with no geographic information, like the one attached to this post.

Sounds difficult. And turns out that it kind of is, _but_ also that the open source #geospatial tools are super powerful and you can totally do it too.

jeremiak.com/blog/extracting-f

#gdal #mapshaper #turfjs

The result of the 10 hour fuel moisture model for November 26, 2022 which shows the continental United States with each pixel's color responding to how much moisture is in the fuel at that spot.
Darren Wiensdkwiens
2022-10-29

A fun cursed map playing with react-three-fiber

2022-09-06

Note to future self:

Use more #turfjs. It’s friggin' awesome!

Question to past self:

Why haven’t you been using more #turfjs? (chringel.dev/2022/09/06/0943/)

先輩に捧げる全国の飛び地リストを作る(市区町村編) by amay077 qiita.com/amay077/items/2c4d22 #Qiita #JavaScript #geo #map #TypeScript #Turfjs

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst