title: How do I "drop a breadcrumb" along an edge every N meters to create inbetween nodes in OSMNX?
body: <p>Is there a way in OSMNX to add inbetween nodes along each edge of a projected graph every N meters?</p>
  <p>This is I suppose the opposite of simplification in a way.</p>
  <p>If there's a long curve on a road, the nodes should still be added on the curve not as the crow flies.</p>
  <p><a href="https://i.stack.imgur.com/U6Pyj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U6Pyj.png" alt="like this" /></a></p>
  <pre class="lang-py prettyprint-override"><code>import osmnx as ox
  
  G = ox.graph_from_place('Cortlandt, New York', network_type='drive', simplify=True)
  
  Gp = ox.project_graph(G)
  
  nodes, edges = ox.graph_to_gdfs(Gp)
  
  # nodes is a GeoDataFrame with GeoSeries of &quot;osmid&quot;, &quot;y&quot;, &quot;x&quot;, &quot;lat&quot;, &quot;lon&quot;, &quot;highway&quot;, and &quot;geometry&quot;
  
  # this is awkward to reference
  
  ls = edges[&quot;geometry&quot;][191122010][3046769062]
  length_m = edges[&quot;length&quot;][191122010][3046769062][0]
  
  d_m = 0
  
  while d_m &lt; length_m:
    point = ls.interpolate(d_m)
  
    node = ...       # TODO
  
    G.add_node(node)
  
    d_m += 50
  
  </code></pre>
  <p>The question is thus how I do create a node that has the same attributes as other nodes on the edge but doesn't use a LineString but rather a point?  And how would I get a lat, lon from the interpolated point?</p>