What is the best way to extract the geometry of a road from OSM data? The goal is to display segments of highway that are closed due to weather. The weather data consists of positions (in KM measured along the road) from major cities, and length of the affected stretch of road. The main problem is clipping the road based on these distances; afterwards rendering seems straightforward.
You definitely want to get that data into Postgis using something like osm2pgsql or imposm (if all you have is an .osm extract) or shp2pgsql (if you have a shapefile). Once your data is in Postgis, you can use some of the linear referencing functions explained here, esp. ST_Line_Interpolate_Point() and ST_Line_Locate_Point():
I imagine that the error in the linear referencing is going to be a major problem. If you have long distances in km and the OSM road is a different geometry to what the weather service uses, then you you'll see errors magnified the further you go.
The easiest way is to download SHAPE files from http://download.geofabrik.de/osm/ . They contain a "roads" layer (these files are updated overnight).
The connected attribute table allows you to quickly categorize the streets in a hierarchical way.
Another layer in the package is (for some cities) the extent.
Hence, subsequent clipping can be done e.g. with QGIS or GRASS GIS.