[
    {
        "role": "user",
        "content": "what%20data%20is%20available%20for%20a%20street%20segment%20(edge)%20when%20using%20openstreets%20(rust%20package%20on%20github%20for%20traversing%20osm%20data)%3F"
    },
    {
        "role": "assistant",
        "content": "Here\u2019s a breakdown of what kinds of data are available on a street\u2010segment (edge) when using Rust tools to traverse OpenStreetMap (OSM) data\u2014especially libraries like osm2streets, osm4routing, osmgraph, etc. The data can be divided into **raw tags** (from OSM), **derived attributes**, **geometry**, and **lane\u2010/road\u2010level semantics**.\n\n---\n\n## 1. Raw tags from OSM\n\nEvery \u201cway\u201d in OSM has a set of key\u2013value tags. For a street segment these often include:\n\n- `highway=*` \u2014 type of road (residential, primary, motorway, etc.)  \n- `name=*` \u2014 street name  \n- `oneway=*` \u2014 whether it\u2019s uni\u2010directional  \n- `lanes=*`, `lanes:forward=*`, `lanes:backward=*` \u2014 number of lanes / direction of lanes ([assets-eu.researchsquare.com](https://assets-eu.researchsquare.com/files/rs-8670080/v1_covered_91c19d96-ad9d-4a29-9c82-d3df97785bfb.pdf?utm_source=openai))  \n- `maxspeed=*` \u2014 speed limit  \n- `surface=*` \u2014 pavement type (asphalt, gravel, unsealed, etc.)  \n- `junction`, `bridge`, `tunnel` \u2014 if the segment passes through special features ([assets-eu.researchsquare.com](https://assets-eu.researchsquare.com/files/rs-8670080/v1_covered_91c19d96-ad9d-4a29-9c82-d3df97785bfb.pdf?utm_source=openai))  \n- `width=*` \u2014 roadway width when mapped or estimated ([assets-eu.researchsquare.com](https://assets-eu.researchsquare.com/files/rs-8670080/v1_covered_91c19d96-ad9d-4a29-9c82-d3df97785bfb.pdf?utm_source=openai))  \n\nThese tags are essentially unprocessed: they come straight from OSM.\n\n---\n\n## 2. Basic edge geometry & identifiers\n\nFrom OSM ways, tools will typically derive:\n\n- Unique IDs: e.g. the OSM way\u2019s ID, sometimes merged edge IDs when splitting ways at intersections or tag boundaries. ([socket.dev](https://socket.dev/cargo/package/osm4routing?utm_source=openai))  \n- Start and end nodes (from\u2010node / to\u2010node), with their coordinates (lat/lon) ([docs.rs](https://docs.rs/osmgraph/latest/osmgraph/?utm_source=openai))  \n- The full geometry (sequence of coordinates forming the LineString), possibly split into multiple segments at intersections or tag changes ([github.com](https://github.com/a-b-street/osm2streets?utm_source=openai))  \n- Length (meters), computed from the geometry ([github.com](https://github.com/a-b-street/osm2streets?utm_source=openai))  \n\n---\n\n## 3. Derived / computed attributes\n\nLibraries often compute additional properties not explicitly in OSM tags. Examples include:\n\n- **Weight / travel time**: edge cost for routing depending on mode (car, bike, foot), speed limits, incline etc. ([cran.r-universe.dev](https://cran.r-universe.dev/dodgr/doc/manual.html?utm_source=openai))  \n- **Accessibility by mode**: flags for whether cars, bicycles, or pedestrians are allowed, directionality per mode. E.g. `lanes:forward`, `lanes:backward` + `oneway` + mode\u2010specific access tags. ([assets-eu.researchsquare.com](https://assets-eu.researchsquare.com/files/rs-8670080/v1_covered_91c19d96-ad9d-4a29-9c82-d3df97785bfb.pdf?utm_source=openai))  \n- **Road class / importance**: inferred from highway tag, lane count, maxspeed.  \n- **Geometry simplifications or splitting**: segments are often split at intersections, change in tags, or direction. This creates more edges than raw ways. ([github.com](https://github.com/a-b-street/osm2streets?utm_source=openai))  \n\n---\n\n## 4. Lane\u2010level detail and semantic structure\n\nSome tools (e.g. osm2streets + osm2lanes) go beyond just per\u2010way tags to build a richer semantic model for edges including:\n\n- A list of *lanes*, ordered left\u2010to\u2010right; for each lane:\n  \u2022 Type (driving / travel, bicycle, sidewalk, parking, shoulder)  \n  \u2022 Direction (forward, backward, both)  \n  \u2022 Width (if tagged or estimated) ([github.com](https://github.com/a-b-street/osm2streets?utm_source=openai))  \n- Lane separators/markings: solid/dashed lines, buffers, medians etc. ([dabreegster.github.io](https://dabreegster.github.io/talks/osm2lanes/slides.html?utm_source=openai))  \n- Drive\u2010side conventions (left vs. right traffic) to interpret \"forward/backward\" and lane order correctly. ([dabreegster.github.io](https://dabreegster.github.io/talks/osm2lanes/slides.html?utm_source=openai))  \n\n---\n\n## 5. Examples of specific Rust crates / tools and their edge data\n\n| Tool / Crate | What edge data is available |\n|--------------|-----------------------------|\n| **osm4routing** | Reads `.pbf` files \u2192 produces `edges.csv` where each edge has `id`, `osm_id`, `from node`, `to node`, length, tags (highway, lanes etc.), and separate lane count for forward/backward if available. ([socket.dev](https://socket.dev/cargo/package/osm4routing?utm_source=openai)) |\n| **osmgraph** | Builds a graph from Overpass query: nodes and edges, using OSM elements. Edges typically retain geometry and basic tags. The current version doesn\u2019t yet fully support directed/one\u2010way edges. ([docs.rs](https://docs.rs/osmgraph/latest/osmgraph/?utm_source=openai)) |\n| **osm2streets** | Rich schema: edges are \u201croad segments\u201d between intersections, each with a center line, lanes (type, direction, width), total width, sidewalks or other non\u2010motorized lanes. ([github.com](https://github.com/a-b-street/osm2streets?utm_source=openai)) |\n\n---\n\nIf you tell me which specific \u201copenstreets\u2010rust\u201d package you meant (e.g. osm2streets, osm4routing, or something else), I can pull up the precise set of edge attributes for that tool."
    }
]