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

Hi,

I'm trying to subset the history and changeset files for Syria to focus on the area around Aleppo. I downloaded the Syria history file and converted it to Syria_history.osm using osm convert and I did the same with the country's changeset file, changesets-170417.osm . I also created a poly file with the following text in it:

Aleppo_City_Rectangle 1 36.3078 37.0229 36.3078 37.2676 36.1066 37.2676 36.1066 37.0229 END END

I then run the following command using osmconvert 64 bit:

osmconvert changesets-170417.osm -B=Aleppo_City_Rectangle.poly --complex-ways --out-osm -o=changesets-170417_01.osm

I get the error (twice on consecutive lines): osmconvert Warning: unexpected end of input file: changesets-170417.osm

Same happens when I run it on the history file. Has anyone had this error before? Trying to process data for a school project. Appreciate any help!

asked 13 Aug '17, 23:40

walshep's gravatar image

walshep
86448
accept rate: 0%


I don't think osmconvert can handle history files. Try Osmium which can do that. Something like this should work:

osmium extract syria.osh.pbf -o aleppo.osh.pbf -b BBOX --with-history

Note that you have to use the --with-history option and I recommend using .osh as file ending with history files instead of .osm, Osmium will then auto-detect the type (works with .osh.pbf, too for PBF files.)

Osmium currently can't filter changeset files by bbox and I don't know of any command that can.

permanent link

answered 14 Aug '17, 07:11

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

Hi Jochen. Thank you for your reply. I was looking into the osmium tool several months ago and even watched your video from SOTM2013 on youtube. It seemed to be ideal for what I'd like to do which is: get statistics on the number of changesets by language, and user stats for the country of Syria, comparing data from 2011 and present to see what the change is.

Back in April, tried to install Osmium but I'm not sure how to get it build it properly. I'm using windows 10 and have Cygwin and in it's lib directory I have the libraries listed on the [GitHub site][1]. I'm not sure what to do from there though. Is the a detailed guide for windows users?

Thanks!

(15 Aug '17, 01:39) walshep

I also read on the features of Osmosis that it can generate the changesets file from osm files. I have the 2011 Syria data from the planet website but I don't have the changeset. Would I be able to use the Osmosis tool to generate the changeset for it?

Also as a workaround to the above problem (that I can't use a bounding box to extract data from a changeset file) I could just use the bounding box to extract the Aleppo data and then use the Osmosis tool on that extracted data to get a changeset correct?

Thanks!

(15 Aug '17, 01:53) walshep
1

If you are having problems compiling Osmium, open an issue on the github issue tracker for it and describe in more details what you are doing. I don't know anything about Windows builds but there might be others there. You can also look at the build-appveyor.bat and build-local.bat files in the repository to get you started. They are used for the automated build on appveyor.com.

I see there is some confusion regarding "change files" and "changeset files". Read about the differences at http://osmcode.org/file-formats-manual/#file-types .

(15 Aug '17, 07:04) Jochen Topf
(16 Aug '17, 23:40) walshep

The following would work in osmconvert:

c:\osmconvert\osmconvert.exe c:\data\OSMplanets\history-141229.osm.pbf –b=-79.3,39.9,-78.2,40.7 –o=c:\data\OSMcities\osm_with_relations\region_history.osm

permanent link

answered 21 Aug '17, 01:33

walshep's gravatar image

walshep
86448
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:

×89
×47
×16

question asked: 13 Aug '17, 23:40

question was seen: 3,850 times

last updated: 21 Aug '17, 01:33

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