We're working on a project using OSM files, which is focused on our region: the Basque Autonomous Community. Some months ago, we're asked (by the Transportation division of the basque government) to introduce HGV restrictions on some roads. These ones were numerous, but we're able to do it manually. This time we must introduce lots of updates to many roads (we don't know the exact number). These're vehicles' max length, height, weight and width restrictions to primary roads, so there's a way to automate it. So far, we've been studying alternatives to accomplish the task. Take region's PBF file and try to parse and modify it using a library. I've tried using Atlas with a Java application, but when loading the map I was thrown the expected OutOfMemoryError exception. Modify online OSM data programmatically. What's the best way to do it? Take into account the task can't be done manually... asked 28 Apr, 15:29 sanchezingartek |
First, do you want to modify the online database for everyone or just your local copy ? I'll focus on the first option. You'll need to follow the Import process, especially discussion with the local community, dedicated account for easy revert and so on. You'll have to publish the input data for public review, test your process on small area first, ask for comments... Level0 is a low-level editor, which might suit your need. JOSM has a lot of power also. My main concern is how will you identify the correct road to edit ? Roads in OSM are split in numerous parts (on bridges, lane changes and such). And of course what do you do if the data is already present, but different ? Are you sure a semi-automated process is not possible, like through MapRoulette, or Osmose ? Mechanical edits are really not encouraged, because the risks to mess the data are high. Regards. answered 28 Apr, 17:22 H_mlet |
Agree with everything H_mlet says, but you should really look at the work of Richard on TfL Cycleway data, see talk-gb. This is a rather analogous problem and therefore I would suggest his approach would work for you. It does depend on having good skills in PostgreSQL, PostGIS and PL/pgSQL. In real practice I would recommend engaging him to consult on the process if that is financially viable. answered 28 Apr, 17:57 SK53 ♦ |
Thanks for your replies. I'd like to share all the modifications, since they're made by the basque government. For the time being, I'll make changes to a local copy. Once all the changes have been made, I'll publish them, following your recommendations. I'm going to explain the process I'm following.
Now, my goal is to filter the map and leave only the roads. I've been told to modify from primary to below highways. According to the wiki, I guess I'd modify these: primary, secondary, tertiary and road. I'd not modify link roads, special road types, paths, sidewalks, cycleways and lifecycles. The tags I've been told to modify, with their respective default generic values, are: maxlength (40m), maxheight (4.7m), maxwidth (5m) and maxweight (110t). These values can be extracted from the following gubernamental document. So, I must modify each tag per each highway:
This statement must be repeated for maxheight, maxwidth and maxweight. The problem here is that I must detect the roads in which there isn't any tag prestablished to avoid override it. It seems Other alternatives would be Thank you answered 29 Apr, 14:11 sanchezingartek 2
First, I must say I've never done any import. But from what I read, here are some humble remarks.
Best regards, and good luck.
(30 Apr, 13:36)
H_mlet
|