-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifying max car speed #289
Comments
Unfortunately, there is currently no way to change the car speeds of road segments from within R. Although you could probably do that by editing the osm.pbf file using other programs |
I tried editing the .pbf with R, wrote the shapefile, loaded it into JOSM and writing the modified pbf file, but all the other_tags field is lost. Do you have any advice on this? |
I don't think it's possible to edit / save osm.pbf data in R, but I might be missing something here. Perhaps osmosis would be the way forward for what you'd like to do but I'm not entirely sure |
Hi @ACalleros. Sorry about the late response, I've just seen this issue now. |
I followed @rafapereirabr advice and I imported the OSM file to R, created a column called maxspeed:motorcar and assigned random values between 1 and 5 as a proof of concept, wrote the file as a geojson, created a modified .osm.pbf file with JOSM and used it to route with R5R. It worked, here's a quick density plot showing travel time values between the original and the modified osm files. |
It's great that you managed to make it work! But stay tuned, we'll let you know once we have a simpler way to achieve this natively through |
@ACalleros , could you please share the code you used in your exercise above ? |
@rafapereirabr yes, I'm having issues generating the pbf files, I'll try to sort it out and share all the needed steps to reproduce it. |
Apparently, it would also be possible to modify car speeds using a geojson polygon. See R5 documenation here. |
@rafapereirabr Hi, Rafa. I've been trying unsuccesfully to generate the osm file. I'm not really sure why it is happening. Do you know any tool besides JOSM that I can use to generate a pbf file from a geojson? |
Hi @ACalleros . I thought you said you had been successful before in creating a modified .osm.pbf file with JOSM. What has changed? |
I did, here are the results, I don't know if there's an issue with latest JOSM versions, but every time I try to create a pbf file it ends up with no geometries. |
As reported by @mvpsaraiva on @290: Since the
If there are any potential contributors who know Java and who might want to have a look at this, we would appreciate PR from collaborators |
Hello, we're trying to calculate accesibility accouting for traffic congestions but we haven't found a way to limit car speed. Do you have any suggestions?
The text was updated successfully, but these errors were encountered: