Skip to content

Geocoding and reverse geocoding with Pelias and Python

Notifications You must be signed in to change notification settings

scepeda78/pyPelias

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update: The latest builds of pelias are working for North America, this library isn't needed.

PyPelias - Geocoding and reverse geocoding with Pelias and Python

Project Description

After installing a planet build of Pelias PyGeo was returning endless errors, It was quicker for me to write this little python API wrapper than try and sort out what the issues where with PyGeo.

This package support geocoding and reverse geo coding to you're own Pelias server using requests and the Pelias API.

Requirements

A complete install of Pelias. I recommend the Docker env (https://github.com/pelias/docker).

Installation

install from https://pypi.org/project/pyPelias/

pip install pyPelias

Usage

import pyPelias

gisAPI = pyPelias('https://mydomain_or_IP_of_pelias')

# reverse geocode - get the location from lat long, in format ['lat', 'long']
loc = gisAPI.reverse(['45.533467', '-122.650095'])

print(loc)

# geocode - takes address, city, state, country in any form, raises exception if can't parse address
geocode = gisAPI.geocode('Alamogordo, New Mexico, United States')

print(geocode)

Notes

We welcome your feedback and support, raise github ticket if you want to report a bug. Need new features? Contact us on github

About

Geocoding and reverse geocoding with Pelias and Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%