Advertisement
Guest User

Untitled

a guest
Nov 29th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. agavrikov@agavrikov-ubuntu:~/osmosis$ bin/osmosis
  2. osmosis
  3.  
  4. Example Usage
  5.  
  6. Import a planet file into a local PostgreSQL database.
  7.  
  8. osmosis --read-xml file=~/osm/planbet/planet.osm --write-apidb host="x" database="x" user="x" password="x"
  9.  
  10. Export a planet file from a local PostgreSQL database.
  11.  
  12. osmosis --read-apidb host="x" database="x" user="x" password="x" --write-xml file="planet.osm"
  13.  
  14. Derive a change set between two planet files.
  15.  
  16. osmosis --read-xml file="planet2.osm" --read-xml file="planet1.osm" --derive-change --write-xml-change file="planetdiff-1-2.osc"
  17.  
  18. Derive a change set between a planet file and a database.
  19.  
  20. osmosis --read-mysql host="x" database="x" user="x" password="x" --read-xml file="planet1.osm" --derive-change --write-xml-change file="planetdiff-1-2.osc"
  21.  
  22. Apply a change set to a planet file.
  23.  
  24. osmosis --read-xml-change file="planetdiff-1-2.osc" --read-xml file="planet1.osm" --apply-change --write-xml file="planet2.osm"
  25.  
  26. Sort the contents of a planet file.
  27.  
  28. osmosis --read-xml file="data.osm" --sort type="TypeThenId" --write-xml file="data-sorted.osm"
  29.  
  30. The above examples make use of the default pipe connection feature, however a simple read and write planet file command line could be written in two ways. The first example uses default pipe connection, the second explicitly connects the two components using a pipe named "mypipe". The default pipe connection will always work so long as each task is specified in the correct order.
  31.  
  32. osmosis --read-xml file="planetin.osm" --write-xml file="planetout.osm"
  33.  
  34. osmosis --read-xml file="planetin.osm" outPipe.0="mypipe" --write-xml file="planetout.osm" inPipe.0="mypipe"
  35.  
  36. Full usage details are available at: http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement