All Projects → gx0r → rrgeo

gx0r / rrgeo

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
A fast, offline, reverse geocoder

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to rrgeo

leaflet-opencage-search
A Leaflet geocoding control that uses the OpenCage geocoding API
Stars: ✭ 18 (-76.32%)
Mutual labels:  geocoding
geocoder
Web app interface for geocoding addresses in CSV files.
Stars: ✭ 17 (-77.63%)
Mutual labels:  geocoding
Osmunda
An offline geocode library for android, powered by SQLite, using osm data. 离线地理编码Android库,基于SQLite,使用开放街道地图数据。
Stars: ✭ 37 (-51.32%)
Mutual labels:  geocoding
pynanoflann
Unofficial python wrapper to the nanoflann k-d tree
Stars: ✭ 24 (-68.42%)
Mutual labels:  kd-tree
node-kdtree
A node.js add-on for performing efficient Nearest Neighbor searches using libkdtree.
Stars: ✭ 58 (-23.68%)
Mutual labels:  kd-tree
Atlas
🌎 Atlas is a set of APIs for looking up information about locations
Stars: ✭ 21 (-72.37%)
Mutual labels:  geocoding
h3-r
R bindings for H3, a hierarchical hexagonal geospatial indexing system
Stars: ✭ 57 (-25%)
Mutual labels:  geocoding
php-opencage-geocode
PHP library to access the OpenCage geocoding API
Stars: ✭ 26 (-65.79%)
Mutual labels:  geocoding
Geocoding-with-Map-Vector
Resources for the ACL 2018 publication "Which Melbourne? Augmenting Geocoding with Maps", published in July 2018.
Stars: ✭ 24 (-68.42%)
Mutual labels:  geocoding
python-omgeo
OMGeocoder - A python geocoding abstraction layer
Stars: ✭ 34 (-55.26%)
Mutual labels:  geocoding
dtp-stat-archive
Карта ДТП v1.0. 👉 База знаний о проекте: https://github.com/dtpstat/dtp-project/wiki
Stars: ✭ 142 (+86.84%)
Mutual labels:  geocoding
python-censusbatchgeocoder
A simple Python wrapper for U.S. Census Geocoding Services API batch service
Stars: ✭ 40 (-47.37%)
Mutual labels:  geocoding
open route service
An encapsulation made around openrouteservice API for Dart and Flutter projects. Made for easy generation of Routes and Directions on Maps, Isochrones, Time-Distance Matrix, Pelias Geocoding, POIs, Elevation and routing Optimizations using their amazing API.
Stars: ✭ 20 (-73.68%)
Mutual labels:  geocoding
django-mapbox-location-field
Simple in use location model and form field with MapInput widget for picking some location. Uses mapbox gl js, flexible map provider API. Fully compatible with bootstrap framework. Can be used with spatial or plain databases.
Stars: ✭ 60 (-21.05%)
Mutual labels:  geocoding
pointu
✏️ Pointillisme tool based on Weighted Voronoi Stippling
Stars: ✭ 32 (-57.89%)
Mutual labels:  kd-tree
geocoder
Geocoder is a Typescript library which helps you build geo-aware applications by providing a powerful abstraction layer for geocoding manipulations
Stars: ✭ 28 (-63.16%)
Mutual labels:  geocoding
addressr
Free Australian Address Validation, Search and Autocomplete
Stars: ✭ 46 (-39.47%)
Mutual labels:  geocoding
geocoding
地理编码技术,提供地址标准化和相似度计算。
Stars: ✭ 148 (+94.74%)
Mutual labels:  geocoding
ais
Address Information System
Stars: ✭ 18 (-76.32%)
Mutual labels:  geocoding
nominatim-java-api
Nominatim search API client written in Java
Stars: ✭ 59 (-22.37%)
Mutual labels:  geocoding

Rust Reverse Geocoder

A fast reverse geocoder in Rust. Inspired by Python reverse-geocoder.

Links

Description

rrgeo takes a latitude and longitude as input and returns the closest city, country, latitude, and longitude, using a k-d tree to efficiently find the nearest neighbour based on a known list of locations. This can be useful if you need to reverse geocode a large number of coordinates quickly, or just need the rough location of coordinates but don't want the expense or complication of an online reverse geocoder.

This crate is implemented as a library, an Actix REST API, a Warp REST API, and as a command-line utility, thanks to Cargo workspaces.

Usage

Command line search

Example usage:

> cargo run -p rrgeo-cmd --release 40 -73
0 ms to search
Location: (40.72788, -73.09761): West Sayville, New York, Suffolk County, US
Distance: 0.539337006499999

Actix Web Server

Example usage:

cargo run -p rrgeo-actix --release

Navigate to the local web server.

Warp Web Server

Example usage:

cargo run -p rrgeo-warp --release

Navigate to the local web server.

Benchmarks

Benchmarked on Apple M1.

  • Core library benchmarked with cargo bench and criterion
  • Web servers benchmarked with oha

Core library:

> cargo bench
search                  time:   [416.30 ns 416.39 ns 416.49 ns]

Served via Axum:

> cargo run -p rrgeo-axum --release
>  oha http://localhost:3000/\?lat\=40\&long\=\-73 -z 5sec
Summary:
  Success rate:	1.0000
  Total:	5.0017 secs
  Slowest:	0.0259 secs
  Fastest:	0.0000 secs
  Average:	0.0003 secs
  Requests/sec:	186333.9800

  Total data:	134.21 MiB
  Size/request:	151 B
  Size/sec:	26.83 MiB

Response time histogram:
  0.000 [19568]  |■■
  0.000 [100727] |■■■■■■■■■■■■
  0.000 [259463] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.000 [252285] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.000 [173138] |■■■■■■■■■■■■■■■■■■■■■
  0.000 [81145]  |■■■■■■■■■■
  0.001 [29013]  |■■■
  0.001 [10079]  |■
  0.001 [3434]   |
  0.001 [1350]   |
  0.001 [1789]   |

Latency distribution:
  10% in 0.0002 secs
  25% in 0.0002 secs
  50% in 0.0003 secs
  75% in 0.0003 secs
  90% in 0.0004 secs
  95% in 0.0004 secs
  99% in 0.0006 secs

Details (average, fastest, slowest):
  DNS+dialup:	0.0015 secs, 0.0012 secs, 0.0017 secs
  DNS-lookup:	0.0000 secs, 0.0000 secs, 0.0001 secs

Status code distribution:
  [200] 931991 responses

Served via Actix Web:

> cargo run --release --bin rrgeo-actix
> oha http://localhost:3000/\?lat\=40\&long\=\-73 -z 5sec
Summary:
  Success rate:	1.0000
  Total:	5.0008 secs
  Slowest:	0.2505 secs
  Fastest:	0.0000 secs
  Average:	0.0003 secs
  Requests/sec:	164159.8709

  Total data:	86.90 MiB
  Size/request:	111 B
  Size/sec:	17.38 MiB

Response time histogram:
  0.000 [395294] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.000 [209631] |■■■■■■■■■■■■■■■■
  0.000 [88554]  |■■■■■■■
  0.000 [53553]  |■■■■
  0.000 [30225]  |■■
  0.000 [13830]  |■
  0.001 [7100]   |
  0.001 [4594]   |
  0.001 [3040]   |
  0.001 [1890]   |
  0.001 [13218]  |■

Latency distribution:
  10% in 0.0000 secs
  25% in 0.0001 secs
  50% in 0.0001 secs
  75% in 0.0002 secs
  90% in 0.0003 secs
  95% in 0.0004 secs
  99% in 0.0012 secs

Details (average, fastest, slowest):
  DNS+dialup:	0.0017 secs, 0.0013 secs, 0.0020 secs
  DNS-lookup:	0.0000 secs, 0.0000 secs, 0.0003 secs

Status code distribution:
  [200] 820929 responses

Served via Warp:

> cargo run --release --bin rrgeo-warp
> oha http://localhost:3000/\?lat\=40\&long\=\-73 -z 5sec
Summary:
  Success rate:	1.0000
  Total:	5.0022 secs
  Slowest:	0.0158 secs
  Fastest:	0.0000 secs
  Average:	0.0003 secs
  Requests/sec:	183796.4070

  Total data:	132.40 MiB
  Size/request:	151 B
  Size/sec:	26.47 MiB

Response time histogram:
  0.000 [20392]  |■■
  0.000 [102885] |■■■■■■■■■■■■
  0.000 [269371] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.000 [242570] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.000 [159505] |■■■■■■■■■■■■■■■■■■
  0.000 [71758]  |■■■■■■■■
  0.001 [27128]  |■■■
  0.001 [11721]  |■
  0.001 [5919]   |
  0.001 [3213]   |
  0.001 [4918]   |

Latency distribution:
  10% in 0.0002 secs
  25% in 0.0002 secs
  50% in 0.0003 secs
  75% in 0.0003 secs
  90% in 0.0004 secs
  95% in 0.0005 secs
  99% in 0.0007 secs

Details (average, fastest, slowest):
  DNS+dialup:	0.0017 secs, 0.0010 secs, 0.0019 secs
  DNS-lookup:	0.0000 secs, 0.0000 secs, 0.0002 secs

Status code distribution:
  [200] 919380 responses

License

Licensed under either of

at your option.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].