Skip to main content

OpenStreetMap coordinates

Project description

openstreetmap is a pure Python library that provides an easy way to extracting OpenStreetMap coordinates by name or relation id.

Code example

python:

# -*- coding: UTF-8 -*-
from openstreemap import Crawler

c = Crawler()
boundary = c.name_parse('合肥市蜀山区', level='county',coo_order=True)
# level: country state city county towns
# coo_order  :False ->lng,lat ; True -> lat,lng  coo_order;
print(boundary.info)
boundary = c.id_parse("2458199", csys='wgs84', coo_order=True)
# csys(Coordinate System): wgs84 gcj02 bd09
print(boundary.info)

boundary.info:

{'name': '', 'relation_id': '', 'boundary': {'outer': '', 'inner': ''}}

Installation

PyPI version:

$ pip install openstreetmap

Alternatively, you can also get the latest source code from GitLab and install it manually:

$ git clone git@git.rtbasia.com:galen/openstreetmap.git
$ cd openstreetmap
$ python setup.py install

For update:

$ pip install openstreetmap --upgrade

License

Project details


Download files

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

Files for openstreetmap, version 0.0.15
Filename, size File type Python version Upload date Hashes
Filename, size openstreetmap-0.0.15.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page