Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rgeocoder

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rgeocoder

A lightweight offline reverse geocoder implemented in Rust.

  • 0.1.6
  • PyPI
  • Socket score

Maintainers
1

rgeocoder

|badgepypi| |badgedocs|

.. |badgepypi| image:: https://img.shields.io/pypi/v/rgeocoder.svg :target: https://pypi.python.org/pypi/rgeocoder :alt: PyPI version

.. |badgedocs| image:: https://img.shields.io/badge/docs-latest-blue :target: https://phil-v.github.io/rgeocoder/ :alt: Documentation

A lightweight offline reverse geocoder implemented in Rust with pyo3 <https://github.com/PyO3/pyo3>_ Python bindings.

Basic usage

.. code-block:: sh

pip install rgeocoder

.. code-block:: python

>>> from rgeocoder import ReverseGeocoder
>>> rg = ReverseGeocoder()
>>> r = rg.nearest(41.891929, 12.511331)  # lat, lon
>>> print(r.name, r.cc)
'Rome IT'
>>> print(r.lat, r.lon)
41.89193 12.51133

Some locations include the first- and second-level administrative divisions:

.. code-block:: python

>>> print(r.admin1)
'Latium'
>>> print(r.admin2)
'Citta metropolitana di Roma Capitale'

See <http://download.geonames.org/export/dump/readme.txt>_ for more information on the dataset.

License

MIT License_

.. _MIT License: LICENSE

Credits

Rust implementation of the algorithm originally based on code from llambda/rust-reverse-geocoder <https://github.com/llambda/rust-reverse-geocoder>_.

Inspired by and meant to act as an alternative to thampiman/reverse-geocoder <https://github.com/thampiman/reverse-geocoder>_.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc