Skip to main content
# osm2geojson

Parse OSM and Overpass JSON with python.

### Usage

Install this package with pip:

```sh
$ pip install osm2geojson
```

If you want to convert OSM xml or Overpass json/xml to Geojson you can import this lib and use one of 2 methods:

* `json2geojson` - to convert Overpass json to Geojson
* `xml2geojson` - to convert OSM xml or Overpass xml to Geojson

__Example:__

```py
import codecs
import osm2geojson

with codecs.open('file.osm', 'r', encoding='utf-8') as data:
xml = data.read()

geojson = osm2geojson.xml2geojson(xml)
# >> { "type": "FeatureCollection", "features": [ ... ] }
```

### Development

Setup package

```sh
$ python setup.py develop
```

Run tests

```sh
$ python -m unittest discover
```

Metadata

Release files for geoformat 20190509.post13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geoformat 20190509.post13
File Size Uploaded Provenance Actions
geoformat-20190509.post13.tar.gz 22.3 kB Without provenance Details for geoformat-20190509.post13.tar.gz

Release files / geoformat-20190509.post13.tar.gz

Download URL geoformat-20190509.post13.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d01adb5bbb9ddc0db91f43ebb3f69ada10234919d95edba6eb96716a264083fe
BLAKE2b-256 checksum
How to use checksums
d33a08e173ae879d5be9739464c488ae6c555674e2a08c13fbb5b2a528e0c0e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.10.0 pkginfo/1.2.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.7

Security for geoformat 20190509.post13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page