in my city the laws regarding streets contain official information about their lengths. I would like to feed that data into OSM using the length tag but the problem is that if I split the corresponding path, the length information will be incorrect (as the path is shorter than the whole street). Any suggestions?
I suggest don’t add it to OSM. You can calculate the length of any way in OSM by measuring the distance between nodes, there is no need for a tag.
Also, the ‘official’ length of a a street may not match what is mapped in OSM anyway, eg if the street starts from a different point. And how accurate are the official lengths?
I can say for routing it wouldn’t be particularly useful since most ways (IME) have to be split up where they intersect other ways and the distances recalculated. Calculating the distances between each node is reasonably accurate for the short distances that most ways cover, IMO.
Well, the idea was to tag that length in order to be able to maybe later verify that we didn’t get something wrong. But that (perhaps the only sensible) solution using relations is indeed a bit complicated and I don’t know if the data is reliable. Maybe I was too keen on copying all data which is officially public domain and will probably keep it out of OSM to only look at that data if I have any doubts about the correctness of our map. But thanks to Peter: I might come back to the relation idea if we have other features of an entire street (and not its single parts).