Difference between revisions of "Routing com os dados do OpenStreetMap"

From Geomaster, Lda
Jump to navigation Jump to search
(Created page with "[http://docs.opentripplanner.org/en/latest/Getting-OTP/ Download do OpenTripPlanner] Dados OpenStreetMap de Portugal Polígono do Porto Usar a Simplify tool (Vector → Geo...")
 
 
Line 14: Line 14:
 
* selecionar uma coluna para servir de POLY file header
 
* selecionar uma coluna para servir de POLY file header
  
<syntaxhighlight>
+
<syntaxhighlight lang="bash">
osmosis --read-pbf file=portugal-latest.osm.pbf --bounding-polygon file=porto.poly --write-pbf porto-latest.osm.pbf
+
osmosis --read-pbf file=portugal-latest.osm.pbf --bounding-polygon file=porto.poly --write-xml porto.osm
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
[http://cross.di.uminho.pt/index.php/Managing_Trieste_OSM_planet_data]
 
[http://cross.di.uminho.pt/index.php/Managing_Trieste_OSM_planet_data]
 +
 +
<syntaxhighlight lang="bash">
 +
mkdir -p ~/otp/graphs/porto
 +
cp porto.osm ~/otp/graphs/porto
 +
ls -l ~/otp/graphs/porto
 +
</syntaxhighlight>
 +
 +
<syntaxhighlight lang="bash">
 +
cd ~/otp
 +
wget https://repo1.maven.org/maven2/org/opentripplanner/otp/1.2.0/otp-1.2.0-shaded.jar
 +
java -jar otp-1.2.0-shaded.jar --build ~/otp/graphs/porto
 +
</syntaxhighlight>

Latest revision as of 11:01, 3 March 2018

Download do OpenTripPlanner

Dados OpenStreetMap de Portugal

Polígono do Porto

Usar a Simplify tool (Vector → Geometry Tools → Simplify Geometries...), para criar uma nova shapefile, usando 0.002 como tolerância.

Export buffer as POLY

Instalar o plugin osmpoly_export no QGIS.

  • selecionar o poligono para exportar
  • selecionar uma coluna para servir de POLY file header
osmosis --read-pbf file=portugal-latest.osm.pbf --bounding-polygon file=porto.poly --write-xml porto.osm

[1]

mkdir -p ~/otp/graphs/porto
cp porto.osm ~/otp/graphs/porto
ls -l ~/otp/graphs/porto
cd ~/otp
wget https://repo1.maven.org/maven2/org/opentripplanner/otp/1.2.0/otp-1.2.0-shaded.jar
java -jar otp-1.2.0-shaded.jar --build ~/otp/graphs/porto