All Projects → gojuno → Jrg

gojuno / Jrg

Licence: apache-2.0
Juno Reverse Geocoder

Labels

Projects that are alternatives of or similar to Jrg

cucumber-react
React components for Cucumber
Stars: ✭ 15 (-28.57%)
Mutual labels:  gherkin
Middleman Blog
Middleman : Blog Engine Extension
Stars: ✭ 317 (+1409.52%)
Mutual labels:  gherkin
Gherkin
Gherkin parser, written in PHP 5.3+ for Behat project
Stars: ✭ 924 (+4300%)
Mutual labels:  gherkin
gherkin
Pure Rust implementation of Gherkin language (`.feature` file) for Cucumber testing framework.
Stars: ✭ 41 (+95.24%)
Mutual labels:  gherkin
Trema
Full-Stack OpenFlow Framework in Ruby
Stars: ✭ 267 (+1171.43%)
Mutual labels:  gherkin
Symfonyextension
🎼 Extension integrating Behat with Symfony.
Stars: ✭ 376 (+1690.48%)
Mutual labels:  gherkin
gavel-spec
Behavior specification for Gavel, validator of HTTP transactions
Stars: ✭ 105 (+400%)
Mutual labels:  gherkin
Pantheon Wordpress Upstream Tests
Tests behavior of WordPress Core upstreams for Pantheon. Also within test suites of contrib plugins
Stars: ✭ 12 (-42.86%)
Mutual labels:  gherkin
Jekyll Responsive Image
An unopinionated Jekyll plugin for generating and using responsive images
Stars: ✭ 289 (+1276.19%)
Mutual labels:  gherkin
Opencypher
Specification of the Cypher property graph query language
Stars: ✭ 534 (+2442.86%)
Mutual labels:  gherkin
flutter gherkin
A Gherkin parsers and runner for Dart and Flutter which is very similar to cucumber
Stars: ✭ 160 (+661.9%)
Mutual labels:  gherkin
behave-restful
BDD Framework to Test REST Services and APIs
Stars: ✭ 47 (+123.81%)
Mutual labels:  gherkin
Contexts
Behat extension with most custom helper steps
Stars: ✭ 387 (+1742.86%)
Mutual labels:  gherkin
sonar-gherkin-plugin
SonarQube Cucumber Gherkin Analyzer
Stars: ✭ 33 (+57.14%)
Mutual labels:  gherkin
Cuke linter
A linting tool for Cucumber
Stars: ✭ 24 (+14.29%)
Mutual labels:  gherkin
CucumberSwift
A lightweight swift Cucumber implementation
Stars: ✭ 40 (+90.48%)
Mutual labels:  gherkin
Behat
BDD in PHP
Stars: ✭ 3,696 (+17500%)
Mutual labels:  gherkin
Jekyll Scholar
jekyll extensions for the blogging scholar
Stars: ✭ 872 (+4052.38%)
Mutual labels:  gherkin
Crudecumber
A manual Cucumber runner RubyGem
Stars: ✭ 9 (-57.14%)
Mutual labels:  gherkin
Karate
Test Automation Made Simple
Stars: ✭ 5,497 (+26076.19%)
Mutual labels:  gherkin

Juno Reverse Geocoder

This is a set of SQL scripts working on a PostGIS database that for a given location return a structured address: from a house number up to a country. Together this makes for a reverse geocoder, which Juno Inc. uses internally.

Installation

Starting it should be simple:

  • Install PostgreSQL, PostGIS, and osm2pgsql.
  • Create a geocoder database in PostgreSQL.
  • Do create extension postgis on the database.
  • Download an OpenStreetMap extract for your area.
  • Run run.sh <file.osm.pbf> to upload the area into the database and start the geocoder.

Docker container

Check docker container section

Usage

The REST API is generally compatible with Nominatim's. No details or language modifiers work. Only jsonv2 format is supported (no need to specify it). Coordinates and identifiers are output as strings.

Sample call:

http://localhost:5000/reverse?lon=-73.80401&lat=40.97230

Sample response:

{
    "address": {
        "country": "United States",
        "state": "New York",
        "county": "Westchester County",
        "locality": "Eastchester",
        "town": "Town of Eastchester",
        "postcode": "10583",
        "road": "White Plains Road",
        "house_number": "750"
    },
    "lat": "40.972219900389",
    "lon": "-73.8037561",
    "name": "Lord and Taylor",
    "display_name": "750 White Plains Road",
    "osm_id": 3111837409,
    "osm_type": "node",
    "type": "poi"
}

Note that non-address tags are dropped, and the only information that remains is whether a point is a POI or not. The type can be one of admin, road, building, address, or poi.

Error Messages

When there is an error in URL arguments (e.g. non-numeric coordinate or osm_id), you'll get HTTP 400 with a json containing a single "message" key.

When an object has not been found, you'll get HTTP 404 with a json containing a single "error" key.

Server errors obviously lead to HTTP 500 errors, although these should not happen.

Contributing

The reverse geocoder is basically two sets of SQL scripts inside the sql directory: one for preprocessing an osm2pgsql database (sql/prepare) and another for doing queries (sql/query). If you aim to improve the quality, go there.

Other scripts and files are merely interfaces to use and access a database with these scripts. They should just work.

Tests reside in the tests directory and are written with behave. Look into tests/features to get human-readable test cases. Feel free to add tests if you think they should cover more cases. Have a look at tests marked @wip: maybe you'll have an idea how to update SQL scripts to accomodate these.

At the moment tests rely on actual OpenStreetMap data which might be not great, since OSM is being constantly improved, so some of these cases would get simpler with time. A good task would be to extract data for each of these tests into a separate osm.pbf file and make the testing framework install a separate instance of a database.

Author and License

The geocoder was written by Ilya Zverev for Juno, published under the Apache 2.0 License.

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].