Comments (2)
Hi @MarcelaBranco . You need to get the bounding box of the city you are analyzing to crop the sudeste-latest.osm.pbf
file. I believe you can do this JOSM, and I am certain you can do this using Osmosis.
If you use osmosis, you can do this from within R. You need to donwload the osmosis
to your computer. The latest releases can be downloaded from here. Next, you can use this step-by-step below:
# get the bounding box of your study area
study_area_polygon <- geobr::read_state(code_state = "ES")
area_bbox <- sf::st_bbox(study_area_polygon)
# input: the path to osmosis and the large pbf file in your local computer
osmosis_path <- "./osmosis_dir/bin/osmosis.bat"
large_pbf_path <- "./project_dir/large.pbf"
# path where you want to save the smaller .pbf file
smaller_pbf <-"./project_dir/smaller.pbf"
# prepare call to osmosis
osmosis_cmd <- sprintf("%s --read-pbf %s --bounding-box left=%s bottom=%s right=%s top=%s --write-pbf %s",
osmosis_path, large_pbf_path,
area_bbox@xmin, area_bbox@ymin, area_bbox@xmax, area_bbox@ymax,
smaller_pbf)
# call to osmosis
shell(osmosis_cmd, translate = TRUE)
from r5r.
Thank you.
from r5r.
Related Issues (20)
- Error testing R5 v7.1 - does not have member field 'int maxDestinations' HOT 1
- Error in .jcall("RJavaTools", "Z", "hasField", .jcast(x, "java/lang/Object"), : java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "<parameter1>" is null HOT 39
- Update required JDK version in Getting Started vignette HOT 6
- r5r v2.0 on CRAN HOT 1
- Isochrones in low-road density contexts HOT 7
- network.dat not built after running setup_r5 HOT 8
- Recurring issue from issue #382: Isochrones in low-road density contexts HOT 1
- Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException HOT 4
- Code redundancy in R5TravelTimeComputer
- convinient function to check Java version HOT 9
- Transit mode not used, problems with GTFS data? HOT 9
- Error using setup_r5() HOT 3
- Errors with setup_r5() HOT 10
- Issues with travel_time_matrix including reasonable transit times HOT 1
- r5r Not recognizing Java Version HOT 21
- Initialize_r5r_core HOT 15
- java.lang.ArrayIndexOutOfBoundsException error when calling accessibility HOT 6
- Max Walk Time HOT 3
- Catchments at different times HOT 3
- travel_time_matrix error: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException. GTFS or r5r issue? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from r5r.