Re: [OSM-dev] pyosmium: osmium extract

2018-11-10 Thread Andrew Byrd


> On 11 Nov 2018, at 08:52, koji higuchi  wrote:
> Thanks for your information.
> Problem is that osmium is not available for windows, and it seems too 
> difficult to install in linux

The osmium command line tool is available as a pre-compiled software package on 
some popular linux distributions. It should be quite easy to install.

On Debian and derivatives (e.g. Ubuntu) you can install it with: ‘sudo apt-get 
install osmium-tool’. Similarly on Fedora there is an RPM package called 
osmium-tool. 

On MacOS you can install it with 'brew install osmium-tool'.

It looks like there are no easily available build of osmium-tool for Windows. 
This is fairly common for open source software. Many FOSS developers have 
little or no experience with Windows or actively avoid it. If you’re going to 
be building data pipelines using a lot of open source tools it’s probably worth 
having a machine (or virtual machine) with a unix-like OS on it.

Here is a support issue where people were setting up a Windows build of osmium. 
It looks like it was eventually abandoned because there was no one to maintain 
it. https://github.com/osmcode/osmium-tool/pull/105 


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


Re: [OSM-dev] pyosmium: osmium extract

2018-11-10 Thread koji higuchi
Thanks for your information.
Problem is that osmium is not available for windows, and it seems too
difficult to install in linux

On Sun, Nov 11, 2018 at 12:46 AM Sarah Hoffmann  wrote:

> On Sat, Nov 10, 2018 at 11:24:35PM +0900, koji higuchi wrote:
> > I mean if similar task could be done with  pyosmium?
>
> There is no built-in functionality for clipping by bounding box
> in pyosmium. Doing this in python would be far too slow.
>
> If you want to process a smaller extract with pyosmium, run
> 'osmium extract' first and then run your pyosmium script on
> the resulting file.
>
> Sarah
>
>
> > On Sat, Nov 10, 2018 at 11:23 PM Jochen Topf  wrote:
> >
> > > On Sat, Nov 10, 2018 at 09:47:40PM +0900, koji higuchi wrote:
> > > > There is  osmium extract command line available for osmium.
> > > >
> > > > osmium extract -b 11.35,48.05,11.73,48.25 germany-latest.osm.pbf \
> > > > -o munich.osm.pbf
> > > >
> > > > How can I use it using the pyosmium?
> > >
> > > You don't. You use it using "osmium". That's why it is an "osmium"
> > > command line. Osmium is a command line tool, PyOsmium is a Python
> > > library based on the libosmium C++ library.
> > >
> > > Jochen
> > > --
> > > Jochen Topf  joc...@remote.org  https://www.jochentopf.com/
> > > +49-351-31778688
> > >
>
> > ___
> > dev mailing list
> > dev@openstreetmap.org
> > https://lists.openstreetmap.org/listinfo/dev
>
>
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] pyosmium: osmium extract

2018-11-10 Thread Sarah Hoffmann
On Sat, Nov 10, 2018 at 11:24:35PM +0900, koji higuchi wrote:
> I mean if similar task could be done with  pyosmium?

There is no built-in functionality for clipping by bounding box
in pyosmium. Doing this in python would be far too slow.

If you want to process a smaller extract with pyosmium, run
'osmium extract' first and then run your pyosmium script on
the resulting file.

Sarah


> On Sat, Nov 10, 2018 at 11:23 PM Jochen Topf  wrote:
> 
> > On Sat, Nov 10, 2018 at 09:47:40PM +0900, koji higuchi wrote:
> > > There is  osmium extract command line available for osmium.
> > >
> > > osmium extract -b 11.35,48.05,11.73,48.25 germany-latest.osm.pbf \
> > > -o munich.osm.pbf
> > >
> > > How can I use it using the pyosmium?
> >
> > You don't. You use it using "osmium". That's why it is an "osmium"
> > command line. Osmium is a command line tool, PyOsmium is a Python
> > library based on the libosmium C++ library.
> >
> > Jochen
> > --
> > Jochen Topf  joc...@remote.org  https://www.jochentopf.com/
> > +49-351-31778688
> >

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


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


Re: [OSM-dev] pyosmium: osmium extract

2018-11-10 Thread koji higuchi
I mean if similar task could be done with  pyosmium?

On Sat, Nov 10, 2018 at 11:23 PM Jochen Topf  wrote:

> On Sat, Nov 10, 2018 at 09:47:40PM +0900, koji higuchi wrote:
> > There is  osmium extract command line available for osmium.
> >
> > osmium extract -b 11.35,48.05,11.73,48.25 germany-latest.osm.pbf \
> > -o munich.osm.pbf
> >
> > How can I use it using the pyosmium?
>
> You don't. You use it using "osmium". That's why it is an "osmium"
> command line. Osmium is a command line tool, PyOsmium is a Python
> library based on the libosmium C++ library.
>
> Jochen
> --
> Jochen Topf  joc...@remote.org  https://www.jochentopf.com/
> +49-351-31778688
>
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] pyosmium: osmium extract

2018-11-10 Thread Jochen Topf
On Sat, Nov 10, 2018 at 09:47:40PM +0900, koji higuchi wrote:
> There is  osmium extract command line available for osmium.
> 
> osmium extract -b 11.35,48.05,11.73,48.25 germany-latest.osm.pbf \
> -o munich.osm.pbf
> 
> How can I use it using the pyosmium?

You don't. You use it using "osmium". That's why it is an "osmium"
command line. Osmium is a command line tool, PyOsmium is a Python
library based on the libosmium C++ library.

Jochen
-- 
Jochen Topf  joc...@remote.org  https://www.jochentopf.com/  +49-351-31778688

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


[OSM-dev] pyosmium: osmium extract

2018-11-10 Thread koji higuchi
Hi,
There is  osmium extract command line available for osmium.

osmium extract -b 11.35,48.05,11.73,48.25 germany-latest.osm.pbf \
-o munich.osm.pbf

How can I use it using the pyosmium?

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