en.osm.town is one of the many independent Mastodon servers you can use to participate in the fediverse.
An independent, community of OpenStreetMap people on the Fediverse/Mastodon. Funding graciously provided by the OpenStreetMap Foundation.

Server stats:

252
active users

#turfjs

0 posts0 participants0 posts today
barefootstache<p>This uses <a href="https://qoto.org/tags/TurfJs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TurfJs</span></a> 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.</p><p>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.</p><p>Further this problem is a typical 'travelling salesman problem' which can be solved via various algorithms.</p><p>Though before considering such optimization issues, there is the main question if the randomly generated POI is even accessible to the public. </p><p>In the case one is a pedestrian, one could use <a href="https://qoto.org/tags/overpass" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>overpass</span></a> to gather information if any <a href="https://qoto.org/tags/OpenStreetMap" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OpenStreetMap</span></a> 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.</p><p>This example only works if there is enough <a href="https://qoto.org/tags/OSM" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OSM</span></a> data at the location.</p><p><a href="https://qoto.org/tags/mathematics" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>mathematics</span></a> <a href="https://qoto.org/tags/maths" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>maths</span></a></p>
My Ruck Club<p>Toying around with the idea of creating a random POI generator which can be used as a <a href="https://indieweb.social/tags/StarCourse" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StarCourse</span></a> or an optimization challenge to navigate throughout the POIs.</p><p>This tool is required for the <a href="https://indieweb.social/tags/SagaOfTheRuckers" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SagaOfTheRuckers</span></a> navigator challenge.</p><p>Tools: <a href="https://indieweb.social/tags/TurfJs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TurfJs</span></a> <a href="https://indieweb.social/tags/Leaflet" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Leaflet</span></a> <a href="https://indieweb.social/tags/OpenStreetMap" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OpenStreetMap</span></a> <a href="https://indieweb.social/tags/WebDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebDev</span></a></p>
Steve Bennett<p>Wow, I just submitted a pull request for Turf. That hasn't happened for a long time.</p><p><a href="https://github.com/Turfjs/turf/pull/2814" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Turfjs/turf/pull/28</span><span class="invisible">14</span></a></p><p><a href="https://mastodon.social/tags/turfJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>turfJS</span></a></p>
Mark Stosberg<p>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`. </p><p><a href="https://github.com/Turfjs/turf/releases" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Turfjs/turf/release</span><span class="invisible">s</span></a></p><p><a href="https://urbanists.social/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://urbanists.social/tags/Nodejs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Nodejs</span></a> <a href="https://urbanists.social/tags/TurfJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TurfJS</span></a> <a href="https://urbanists.social/tags/Turf" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Turf</span></a> <a href="https://urbanists.social/tags/GIS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>GIS</span></a> <a href="https://urbanists.social/tags/Mapping" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Mapping</span></a></p>
Eugene Alvin Villar 🇵🇭<p>The Bing ML buildings data is from this GitHub repo and first released in 2022: <a href="https://github.com/microsoft/IdMyPhBuildingFootprints" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/microsoft/IdMyPhBui</span><span class="invisible">ldingFootprints</span></a></p><p>I used the following tools/services:<br />▪︎ <span class="h-card" translate="no"><a href="https://en.osm.town/@geofabrik" class="u-url mention">@<span>geofabrik</span></a></span> for the OSM buildings<br />▪︎ <a href="https://en.osm.town/tags/OverpassTurbo" class="mention hashtag" rel="tag">#<span>OverpassTurbo</span></a> for extracting clipping polygons from OSM<br />▪︎ Osmosis for filtering the OSM buildings<br />▪︎ <span class="h-card" translate="no"><a href="https://fosstodon.org/@qgis" class="u-url mention">@<span>qgis</span></a></span> <a href="https://en.osm.town/tags/QGIS" class="mention hashtag" rel="tag">#<span>QGIS</span></a> for GeoJSON clipping and data conversion<br />▪︎ A couple of hand-coded Perl scripts for data manipulation<br />▪︎ <a href="https://en.osm.town/tags/TurfJS" class="mention hashtag" rel="tag">#<span>TurfJS</span></a><br />▪︎ <a href="https://en.osm.town/tags/LeafletJS" class="mention hashtag" rel="tag">#<span>LeafletJS</span></a> for rendering<br />▪︎ H3 for hexbinning<br />▪︎ <span class="h-card" translate="no"><a href="https://floss.social/@GIMP" class="u-url mention">@<span>GIMP</span></a></span> <a href="https://en.osm.town/tags/GIMP" class="mention hashtag" rel="tag">#<span>GIMP</span></a> for final map prep</p><p>🧵 3/4</p>
Mark Stosberg<p>I was helping an <a href="https://urbanists.social/tags/UrbanPlanning" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>UrbanPlanning</span></a> friend with some spatial analysis with <a href="https://urbanists.social/tags/QGIS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>QGIS</span></a> but the project seemed to be running out of her 8GB memory.</p><p>I advised a <a href="https://urbanists.social/tags/FrameworkLaptop" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FrameworkLaptop</span></a> with more memory. She got the DIY option, which lead her to consider her OS choice, which lead her try <a href="https://urbanists.social/tags/Linux" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Linux</span></a> (<a href="https://urbanists.social/tags/Ubuntu" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ubuntu</span></a>), which is what she installed after testing it.</p><p>Now we'll get back on track using <a href="https://urbanists.social/tags/QGIS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>QGIS</span></a> / <a href="https://urbanists.social/tags/Docker" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Docker</span></a> / <a href="https://urbanists.social/tags/Valhalla" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Valhalla</span></a> / <a href="https://urbanists.social/tags/TurfJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TurfJS</span></a> to explore some spatial analysis ideas.</p>
Mark Stosberg<p>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.</p><p><a href="https://mark.stosberg.com/bike-network-connectivity-rank/?ref=mastodon" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mark.stosberg.com/bike-network</span><span class="invisible">-connectivity-rank/?ref=mastodon</span></a></p><p>Thanks to all the open source mapping projects that helped make this possible, including <a href="https://urbanists.social/tags/qgis" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>qgis</span></a> <a href="https://urbanists.social/tags/valhalla" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>valhalla</span></a> <a href="https://urbanists.social/tags/josm" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>josm</span></a> and <a href="https://urbanists.social/tags/turfjs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>turfjs</span></a>. And yes, I used JavaScript for this. </p><p>Feedback, improvements welcome!</p><p><a href="https://urbanists.social/tags/mapping" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>mapping</span></a> <a href="https://urbanists.social/tags/spatialAnalysis" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>spatialAnalysis</span></a> <a href="https://urbanists.social/tags/minneapolis" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>minneapolis</span></a></p>
Mark Stosberg<p>Currently waiting on my old laptop to merge 3,476 isochrone polygons into a single MultiPolygon, 🤞 that it doesn't crash part way through. </p><p><a href="https://urbanists.social/tags/turfjs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>turfjs</span></a> does crash in cases like this, so I'm using `polyclip-ts`.</p><p>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:</p><p><a href="https://github.com/Turfjs/turf/issues/2409#issuecomment-1662873720" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Turfjs/turf/issues/</span><span class="invisible">2409#issuecomment-1662873720</span></a> </p><p>1,500 polygons left to merge...🧵</p>
Mark Stosberg<p>🧵 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.</p><p><a href="https://github.com/Turfjs/turf/issues/2585#issuecomment-2207850688" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/Turfjs/turf/issues/</span><span class="invisible">2585#issuecomment-2207850688</span></a></p><p><a href="https://urbanists.social/tags/turfjs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>turfjs</span></a> 🧵</p>
Mark Stosberg<p><span class="h-card" translate="no"><a href="https://a2mi.social/@samfirke" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>samfirke</span></a></span> <span class="h-card" translate="no"><a href="https://mastodon.nz/@spatialThinkLab" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>spatialThinkLab</span></a></span> I can't confirm. I can't videos from the 2023 conference at least. </p><p>Besides the source code I linked above, I also have a blog post about sidewalk priority mapping:</p><p><a href="https://mark.stosberg.com/how-to-create-a-heatmap-sidewalk-location-priority/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mark.stosberg.com/how-to-creat</span><span class="invisible">e-a-heatmap-sidewalk-location-priority/</span></a></p><p><a href="https://urbanists.social/tags/OpenStreetMap" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OpenStreetMap</span></a> <a href="https://urbanists.social/tags/turfjs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>turfjs</span></a></p>