Giter VIP home page Giter VIP logo

da2020's Introduction

A self-hosting Ha Noi Maps Service

Tags: A* algorithm, inverted index, pathfinding, openstreetmap, haversine distance, mercator projector, osmdroid

app

API

GET /places: getListPlaceByName(name) //searching location

GET /locations: getLocationByPoint(lat,lng) //when user click on map

GET /roads: getRoadByPoint(lat,lng) //show nearest edge if location not in graph

GET /directions: getDirection(from,to) //A* algorithm

Data

Raw data from https://www.openstreetmap.org/export

Graph

app

Generate graph (E,V) from raw data: /pre_processing/FileGenerator.java

vertex.txt: (id | latitude | longitude)

  • 84849316 20.9604061 105.8131604
  • 84849317 20.9605819 105.8134018
  • 84849318 20.9608304 105.8137365
  • ...

egde.txt: (id1 | id2)

  • 1706698186 3511597208
  • 3511597208 3511597207
  • 3511597207 6658315197
  • ...

Location

Filter name from raw data: /pre_processing/NameFilter.java

name.txt: (index | name | nearest_vertex)

  • 70::Học viện Y dược học cổ truyền Việt Nam ~ ::5710591076
  • 71::Đường Nguyễn Trãi ~ ::5710591076
  • 72::Duy Shop - 283 Vũ Tông Phan ~ Khương Trung, Thanh Xuân::6610973025
  • 73::Số 283 Vũ Tông Phan ~ Khương Trung, Thanh Xuân::6610973025
  • ...

Searching

Inverted Index from name.txt: /pre_processing/InvertedIndex.java

inverted_index.txt: (term | list_index)

  • hang = {44,47,49,189,219,300,302,568,592,598,655}
  • hanh = {176,185,619,827}
  • nghe = {66,801,913,1359}
  • vm+ = {543,544,545,546,558,559,560,561,562}
  • xom = {194,755,840,872,873,884}
  • ...

result:

app

da2020's People

Contributors

hoangpn avatar

Stargazers

 avatar

Watchers

 avatar

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.