Re: [OSM-dev] Which is best for this task, osmosis, osmconvert osmupdate or...

2015-12-30 Thread Frederik Ramm
Hi,

On 12/30/2015 01:02 AM, Dave F. wrote:
> A couple of problems with that, I'm afraid. Firstly they don't provide 
> my area & secondly I'm trying to avoid large downloads like the 670mb 
> England file & amendment files for data I'm never going to need. Is 
> there not a way to work just within a user specified polygon?

There's no service I know that would deliver updates for an user defined
area (only). It is however possible to apply updates for a larger area
to your extract if you cut away the extra stuff afterwards again, i.e.
the workflow being:

(once) download UK, or Europe, or world
(once) cut out your area of interest
(regularly) apply UK, or Europe, or world updates to your area of
interest yielding a file with your area of interest plus bits and bobs
around the world
(regularly) cut out your area of interest from the "area of interest
plus bits and bobs around the world" file

Of course if the area you are interested in is *so* small that even
downloading the too-large diffs each day will seem like a waste, then
I'd recommend to simply download the full area from Overpass regularly.

Bye
Frederik

-- 
Frederik Ramm  ##  eMail frede...@remote.org  ##  N49°00'09" E008°23'33"

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


[OSM-dev] Which is best for this task, osmosis, osmconvert osmupdate or...

2015-12-29 Thread Dave F.

Hi

I'm a bit unsure which program is best to perform the actions I list below.

I've previously download a file of all OSM data within a rectangular 
area. I then use mkgmap to convert it to the format by my Garmin GPSr. 
In the future I'd like to change that so it's a multi faceted polygon of 
only specified OSM entities.


At present, each time I want to update the file, I'm downloading every 
entity, even if they haven't been amended. What I need is to download 
any changes within the polygon since I last updated. I read about 
minute, hourly & daily diffs. Am I able to state the date I last updated 
as the start point for new data?


There appear to be a few programs able to do what I require, but unsure 
which is best suited. Is Osmosis a bit overblown for my purpose. 
Osmupdate seems a bit more lightweight. Osmconvert appears to discourage 
doing what I need: 
http://wiki.openstreetmap.org/wiki/Osmupdate#Use_Cases. Overpass also 
has a way to download diffs. Anyone used that?


Is it better to work with a raw OSM data file or use a .pbf file? In 
fact I'm a bit confused what one is. From the wiki it firstly says 
"alternative to the XML format", but then goes on to compare it with a 
compressed file format. Which is it?


Your help is appreciated.

Cheers
Dave F.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Which is best for this task, osmosis, osmconvert osmupdate or...

2015-12-29 Thread Dave F.

Thanks for the reply.

On 29/12/2015 21:09, Paul Norman wrote:

On 12/29/2015 9:41 AM, Dave F. wrote:
I've previously download a file of all OSM data within a rectangular 
area. I then use mkgmap to convert it to the format by my Garmin 
GPSr. In the future I'd like to change that so it's a multi faceted 
polygon of only specified OSM entities.


At present, each time I want to update the file, I'm downloading 
every entity, even if they haven't been amended. What I need is to 
download any changes within the polygon since I last updated. I read 
about minute, hourly & daily diffs. Am I able to state the date I 
last updated as the start point for new data?


There appear to be a few programs able to do what I require, but 
unsure which is best suited. Is Osmosis a bit overblown for my 
purpose. Osmupdate seems a bit more lightweight. Osmconvert appears 
to discourage doing what I need: 
http://wiki.openstreetmap.org/wiki/Osmupdate#Use_Cases. Overpass also 
has a way to download diffs. Anyone used that?


Your best bet is to get an extract from Geofabrik which contains the 
areas you need and use their daily diffs to keep it up to date. If you 
need a smaller area, extract it from this larger file every day.


A couple of problems with that, I'm afraid. Firstly they don't provide 
my area & secondly I'm trying to avoid large downloads like the 670mb 
England file & amendment files for data I'm never going to need. Is 
there not a way to work just within a user specified polygon?




Is it better to work with a raw OSM data file or use a .pbf file? In 
fact I'm a bit confused what one is. From the wiki it firstly says 
"alternative to the XML format", but then goes on to compare it with 
a compressed file format. Which is it?


OSM PBFs are raw OSM data, as is OSM XML and o5m. They're just 
different file formats. Avoid OSM XML unless you're using software 
which only supports that. Use PBF or o5m instead. PBF is easier to use 
with the workflow I describe above since you can download a PBF 
directly from Geofabrik.


So it's the original OSM(XML) fie format that's been compressed into a 
PBF container, similar in concept to zip files?


Cheers
Dave F.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Which is best for this task, osmosis, osmconvert osmupdate or...

2015-12-29 Thread Paul Norman

On 12/29/2015 9:41 AM, Dave F. wrote:
I've previously download a file of all OSM data within a rectangular 
area. I then use mkgmap to convert it to the format by my Garmin GPSr. 
In the future I'd like to change that so it's a multi faceted polygon 
of only specified OSM entities.


At present, each time I want to update the file, I'm downloading every 
entity, even if they haven't been amended. What I need is to download 
any changes within the polygon since I last updated. I read about 
minute, hourly & daily diffs. Am I able to state the date I last 
updated as the start point for new data?


There appear to be a few programs able to do what I require, but 
unsure which is best suited. Is Osmosis a bit overblown for my 
purpose. Osmupdate seems a bit more lightweight. Osmconvert appears to 
discourage doing what I need: 
http://wiki.openstreetmap.org/wiki/Osmupdate#Use_Cases. Overpass also 
has a way to download diffs. Anyone used that?


Your best bet is to get an extract from Geofabrik which contains the 
areas you need and use their daily diffs to keep it up to date. If you 
need a smaller area, extract it from this larger file every day.


Is it better to work with a raw OSM data file or use a .pbf file? In 
fact I'm a bit confused what one is. From the wiki it firstly says 
"alternative to the XML format", but then goes on to compare it with a 
compressed file format. Which is it?


OSM PBFs are raw OSM data, as is OSM XML and o5m. They're just different 
file formats. Avoid OSM XML unless you're using software which only 
supports that. Use PBF or o5m instead. PBF is easier to use with the 
workflow I describe above since you can download a PBF directly from 
Geofabrik.


___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Which is best for this task, osmosis, osmconvert osmupdate or...

2015-12-29 Thread Paul Norman



On 12/29/2015 4:02 PM, Dave F. wrote:

Thanks for the reply.

Your best bet is to get an extract from Geofabrik which contains the 
areas you need and use their daily diffs to keep it up to date. If 
you need a smaller area, extract it from this larger file every day.


A couple of problems with that, I'm afraid. Firstly they don't provide 
my area


Not even the British Isles file covers the area you need?

& secondly I'm trying to avoid large downloads like the 670mb England 
file & amendment files for data I'm never going to need.


The diff files are 1-2 MB/day.

I suppose one option if the area you need crosses a couple of extracts 
and there's not a suitable one that covers both is to combine multiple 
extracts. You'd then consume the diffs for each extract and merge 
multiple files locally. Greater London is 50k-150k/day, and that's 
probably the biggest sub-region.


I can see doing this two ways

osmosis
  --rri workingDirectory=area1 --simc --rbf area1/current.pbf --ac 
--tee --wb area1/new.pbf
  --rri workingDirectory=area2 --simc --rbf area2/current.pbf --ac 
--tee --wb area2/new.pbf

  --merge # repeat --merge as many times as needed
  --bp --wb yourarea-new.pbf

Then swap files around to have the new files.

Another option would be

osmosis --rri workingDirectory=area1 --rri workingDirectory=area2 --mc # 
repeat --mc as needed
  --simc --rbf bigarea-current.pbf --ac --tee --wb bigarea-new.pbf --bp 
--wb myarea-new.pbf


I'm not sure which is better, and both might need some sorts and buffers.
Is it better to work with a raw OSM data file or use a .pbf file? In 
fact I'm a bit confused what one is. From the wiki it firstly says 
"alternative to the XML format", but then goes on to compare it with 
a compressed file format. Which is it?


OSM PBFs are raw OSM data, as is OSM XML and o5m. They're just 
different file formats. Avoid OSM XML unless you're using software 
which only supports that. Use PBF or o5m instead. PBF is easier to 
use with the workflow I describe above since you can download a PBF 
directly from Geofabrik.


So it's the original OSM(XML) fie format that's been compressed into a 
PBF container, similar in concept to zip files?


No, it's OSM data in the standard OSM data model of nodes, ways, and 
relations, encoded in a particular way. There isn't XML in it anywhere. 
There's more detail about the format on the wiki, but as a user the 
three parts that matter are that it's smaller than bzipped XML, faster 
than bzipped XML or decompressed XML, and most tools support it.


___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev