I would like to pre process osm-data before feeding it to my routing engine. For instance, I would like to change a highway=unclassified to highway=residential if that way resides completeley in an area with landuse=residential. But I have no clue on how to do this.
I have no practical experience with this, but I have seen enough on these forums and the mailinglists that if this task was given to me, I would start with searching the internet for information about Postgis, ST_within and ST_contains.
Just out of curiosity, why do you want to change “residential” do “unclassified”? These tags have different meanings…
In the netherlands, most of the residential ways, are not tagged as such, instead most of them are tagged as unclassified. However, a dutch institution provided OSM with extensive landuse data in the form of area’s. So if I could project de area-data onto the ways that lie within, I would be able to give those ways a proper residential tag and thus, giving it a speed penalty in the routing engine.