NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I apologise for such a silly question as I realise I must be doing something really silly. All help will be greatly appreciated.

The command

osmosis --read-xml "C:\Users\John\Desktop\Test.osm" --write-xml "C:\Users\John\Desktop\fred.osm"

does not write fred.osm. osmosis runs and I get:

C:\Users\John\Desktop>osmosis --read-xml "C:\Users\John\Desktop\Test.osm" --write-xml "C:\Users\John\Desktop\fred.osm" C:\Users\John\Desktop>"C:\Program Files (x86)\Osmosis\bin\osmosis.bat"Oct 08, 2020 4:58:36 PM > org.openstreetmap.osmosis.core.Osmosis run INFO: Osmosis Version 0.48.3 Oct 08, 2020 4:58:36 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Preparing pipeline. Oct 08, 2020 4:58:36 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Launching pipeline execution. Oct 08, 2020 4:58:36 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Pipeline executing, waiting for completion. Oct 08, 2020 4:58:36 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Pipeline complete. Oct 08, 2020 4:58:36 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Total execution time: 786 milliseconds.

Setup.

  1. I copied osmosis to C:\Program Files (x86)\osmosis.
  2. Test.osm is on the desktop.
  3. I have Java 8 Update 261 and Java Update 261 (64 bit) installed
  4. I started a CMD window and entered osmosis --read-xml "C:\Users\John\Desktop\Test.osm" --write-xml "C:\Users\John\Desktop\fred.osm"
  5. I tried without paths as osmosis --read-xml Test.osm --write-xml fred.osm but it did not write
  6. Test.osm contains

    <?xml version="1.0" encoding="UTF-8"?> <osm version="0.6" generator="ANW"> <bounds minlat="49.7667486" minlon="-8.1628456" maxlat="60.8081270" maxlon="1.7604432"/> <node id="1152921504610000001" lat="57.1496060" lon="-2.0969160" user="nobody" uid="1" visible="true" version="1" changeset="1" timestamp="2013-01-25T01:21:31Z"> <tag k="amenity" v="postal_code"/> <tag k="name" v="AB10 1AB"/> </node> <node id="1152921504610000002" lat="57.1487070" lon="-2.0978060" user="nobody" uid="1" visible="true" version="1" changeset="1" timestamp="2013-01-25T01:21:31Z"> <tag k="amenity" v="postal_code"/> <tag k="name" v="AB10 1AF"/> </node> </osm>

asked 08 Oct '20, 18:14

John-Ha's gravatar image

John-Ha
11113
accept rate: 0%

edited 08 Oct '20, 20:39


I am getting there. It is a paths problem.

  1. Place the osmosis folder on the desktop
  2. Place test.osm in the osmosis\bin folder along with osmosis.bat
  3. Create a shortcut for osmosis.bat. r-click > Properties. Add C:\Windows\System32\cmd.exe /k in Target so it reads C:\Windows\System32\cmd.exe /k C:\Users\John\Desktop\Osmosis\bin\osmosis.bat
  4. click the shortcut to run osmosis
  5. type osmosis --read-xml file=Test.osm --write-xml file=fred.osm

osmosis runs and fred.osm is written to \bin.

permanent link

answered 08 Oct '20, 19:27

John-Ha's gravatar image

John-Ha
11113
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×252
×48
×2

question asked: 08 Oct '20, 18:14

question was seen: 1,722 times

last updated: 08 Oct '20, 20:39

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum