I have an existing pgrouting network topology that I would like to add a road to. The road is a linestring from a shapefile and will intersect several roads in the existing network. Is there an easy way to add the road into 'ways' so it is segmented properly and new vertices are created at the intersections?
Depending on your use case, you might want to try:
1) Split the road at the intersections: https://gis.stackexchange.com/a/71291/37568
2) Insert the results into your road network.
3) Drop the "_noded" and "_vertices_pgr" tables. If for example your table is named "roads", the other two will be named "roads_noded" and "roads_vertices_pgr"
SELECT pgr_createTopology('roads', 0.000001);
SELECT pgr_nodeNetwork('roads', 0.000001);
The proper/efficient way is the one by @dkastl, but if you don't care about maintaining node ids and speed is not an issue, you may find this sufficient.