Coder Social home page Coder Social logo

Comments (4)

dabreegster avatar dabreegster commented on September 27, 2024 1

The main use is in drawing low traffic neighbourhood "cells". If you click on an area in https://play.abstreet.org/0.3.48/ltn.html?system/gb/bristol/maps/east.bin, it's split into colored areas showing what's reachable by car without leaving the area. https://dabreegster.github.io/talks/aiuk_ltn/slides.html#/approximating-with-grids-1 describes how it's calculated -- approximate the area with a grid, floodfill different colors out. The end result needs to be clipped to the polygon of the overall area. That works most of the time, but I've hit a few cases that crash.

I think I have some other ideas for using boolean ops in related projects. The way this tool calculates "an area bounded by main roads" is quite brittle and complex, gluing together road edge-lines calculated (very imperfectly) from OpenStreetMap. I'd like to try simpler approaches like

  1. Find all "severances" like main roads, railway, rivers
  2. Possibly buffer linestrings into thicker polygons
  3. Split the overall area by these lines
    Some of these might need other primitive geometric operations, but I think boolops could help. So, thanks a ton for working on a more robust implementation! I imagine it has really wide use.

from abstreet.

RobWalt avatar RobWalt commented on September 27, 2024

Please refer to this PR georust/geo#1089. There's a new implementation on it's way which returns Results instead of panicing. It also didn't really hit any of the Err cases for all the existing tests yet.

from abstreet.

dabreegster avatar dabreegster commented on September 27, 2024

Super exciting to see the new implementation! I am completely swamped with work the next few weeks, but it should be pretty quick for me to then swap over the implementation used here and either confirm many bugs go away or provide new test cases.

from abstreet.

RobWalt avatar RobWalt commented on September 27, 2024

Just out of curiosity: What's your use case in this repo here?

from abstreet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.