Giter VIP home page Giter VIP logo

addressor's Introduction

Addressor

An address validator service.

Concept

Keep it in the memory. Produce a map of addresses like the following:

{
  "hu" => {
    "budapest": {
      "1085": {
        "jozsef": {
          "korut": {
            "16": {
              "city"=> "Budapest", 
              "state"=>nil,
              "county"=>nil,
              "region"=>nil,
              "postcode"=>"1085",
              "street"=>"József körút",
              "number"=>"16",
              "unit"=>nil
            }
          }
        }
      }
    }
  }
}

Recieve an input: Budapest, József korut 16, 1085

Normalize it to something like this:

["budapest", "jozsef", "korut", "16", "1085"]

Then recursively iterate over each and try to navigate down each map received in each iteration. Finally you should end up with an address hash.

Missing country codes

To handle missing contry codes, the easiest way to store a map without the country code as a separate map in the map list.

Data

Currently it handles osm.pbf, but geojson will also be added. Just copy your pbf into data/osm/[country_code]/my.osm.pbf.

Instructions

docker build -f docker/Dockerfile -t addressor .
docker run --rm -i -t -v ./:/app -v ./docker/home:/root:Z -w /app -p 3000:3000 addressor /bin/bash
bundle exec puma -p 3000

TODO

  • Reinstate geojson loading from history
  • Normalize countries to country codes
  • Normalize street types or try to ignore them if possible
  • Optimize JSONs by eliminating layers with single keys
  • Unfold compound house numbers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.