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 |
I don't think osmconvert can handle history files. Try Osmium which can do that. Something like this should work:
Note that you have to use the Osmium currently can't filter changeset files by bbox and I don't know of any command that can. answered 14 Aug '17, 07:11 Jochen Topf 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 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
Thanks! I was able to download a windows build from: https://ci.appveyor.com/project/Mapbox/osmium-tool/build/1.0.284/job/m9ye1tolkglwqmas/artifacts
(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 answered 21 Aug '17, 01:33 walshep |