Skip to main content

Small python tool to clip pre-defined areas from the planet osm file.

Project description

OpenStreetMap clipper

Small python tool to clip pre-defined areas from large osm.pbf files, using osmconvert or osmosis.

The tool is at the moment specifically written to split the OpenStreetMap planet file into countries and regions, based on the GADM36 classification. Future versions will allow for user-defined input as well.

Please note: This package is still in development phase. In case of any problems, or if you have any suggestions for improvements, please raise an issue.

Installation

  1. Clone the repository or download the package on your computer and extract the folder.
  2. Go to the osm_clipper folder in your command prompt or bash.
  3. Type python setup.py install and it should install itself into your python environment.
  4. Now you can import the package like any other package!

Dependency on osmcovert or osmosis

In essence, osm_clipper is just a wrapper around osmconvert and osmosis. To make it work, make sure you add either osmconvert or osmosis to your environmental variables.

How to set environmental variables on Windows:

  1. Search for Edit the System Environmental Variables and click on it.
  2. Click on the Environmental Variables button.
  3. Search in your System variables for Path.
  4. Click on the New button and add the location of osmconvert and/or osmosis.

NOTE: the default is osmconvert. If you want to use osmosis, specify osmconvert==False in the single_countries or all_countries functions.

License

Copyright (C) 2020 Elco Koks. All versions released under the MIT license.

IVM

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osm_clipper-0.0.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

osm_clipper-0.0.2-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file osm_clipper-0.0.2.tar.gz.

File metadata

  • Download URL: osm_clipper-0.0.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0.post20200704 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for osm_clipper-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9d61092454bcdb6e5624516ba05232c6176eb0bd2f7f1abed30b2530cce524bf
MD5 cd54cb2ac675e5cdf7e266bcac3ff71b
BLAKE2b-256 18f7ab333125a5fbcaed34c604fa8df6063db5f8fc8f6567e1fb6d225297d377

See more details on using hashes here.

File details

Details for the file osm_clipper-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: osm_clipper-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0.post20200704 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for osm_clipper-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f85ba6256ccce96e5b8066e57633fa8d7af108e075f1433291f8ed13b4adf71b
MD5 eb444d8785609a7577c7701a504a813f
BLAKE2b-256 0effd81694b4491d4742043791ed3d221b645a4c05a2087ceb6022619127922d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page