Coder Social home page Coder Social logo

runcreator's Introduction

RunCreator

Create run routes using open streets maps

Query a region for street data

wget -O test.osm "https://api.openstreetmap.org/api/0.6/map?bbox=-73.2912,41.1319,-73.2717,41.1459"

Debugging using the Overpass API

http://overpass-turbo.eu/#

Find adjacent roads

  1. Start with a geo location
[out:json];
(
  way
  (around:100,41.1387123,-73.2758326)
  [highway~"^(primary|secondary|tertiary|residential)$"]
  [name];
);
out body;
>;
out skel qt;
  1. Find the closest road <way id=""> where the name matches.
  2. Now find connected roads. This entity contains <nd ref="">. Those reference ids will match up with intersections with other roads. There are also lat/lon coordinates for each ref. The refs in order are the points for the road and are a straight line. For example for "River Steet" <wav id="10166782" the refs are 83925660 (Harbor Road), 3987329574 (bend), 83925658 (bend), 2031064506 (bend), 6538386660 (River Lane), 2031064511 (bend), 83925656 (Cardinal Hill), 83925654 (Taintor), 2200024065 (Post Road)

Ex: with traffic signal

[out:json];
(
	way(121787428);
	node(w);
	way[highway](bn);
);
out body;
>;
out skel qt;

Ex: with bicycle

[out:json];
(
	way(102033264);
	node(w);
	way[highway](bn);
);
out body;
>;
out skel qt;

Click data to see the raw osm data

Routing Considerations

  • Minimize traffic signal crossings
<node id="83989035" lat="41.1412430" lon="-73.2630555">
  <tag k="highway" v="traffic_signals"/>
</node>
  • Maximize foot path or bycycle or sidewalk
<tag k="bicycle" v="yes"/>
<tag k="foot" v="yes"/>
<tag k="sidewalk" v="right"/>

runcreator's People

Contributors

djsamseng avatar

Watchers

 avatar

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.