Giter Site home page Giter Site logo

sean0719 / barefoot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from boathit/barefoot

0.0 1.0 0.0 38.54 MB

Map matching for the cities in China

License: Apache License 2.0

Python 1.87% TeX 1.22% Dockerfile 0.06% Shell 0.27% PLpgSQL 0.21% Java 28.88% JavaScript 0.11% HTML 0.36% TSQL 67.01%

barefoot's Introduction

Barefoot for China Cities

Map server

  1. Install prerequisites.

  2. Download the map data and extract the city data

    git clone https://github.com/boathit/barefoot
    cd barefoot/map/osm/
    curl http://download.geofabrik.de/asia/china-latest.osm.pbf -o barefoot/map/osm/china.osm.pbf
    osmosis --read-pbf file=china-latest.osm.pbf --bounding-box left=126.506130 right=126.771862 bottom=45.657920 top=45.830905 --write-pbf file=harbin.osm.pbf

    If you want to change the city, remember to modify the input in this line in import.sh.

  3. Build Docker image.

    cd barefoot
    docker build -t imap ./map
  4. Create Docker container.

    docker run -it -p 5432:5432 --name="harbin-map" -v ${PWD}/map/:/mnt/map imap
  5. Import OSM extract (in the container).

    root@acef54deeedb# bash /mnt/map/osm/import.sh

    To detach the interactive shell from a running container without stopping it, use the escape sequence Ctrl-p + Ctrl-q.

    If we want to attach it again, we can do

    docker attach <container id>
  6. Make sure the container is running ("up").

    docker ps -a
    ...

We can restart the created container (if it is stopped)

docker start --interactive harbin-map

Matching server

  1. Install prerequisites.

    • Maven (e.g. with sudo apt-get install maven)
    • Java JDK (Java version 7 or higher, e.g. with sudo apt-get install openjdk-1.7-jdk)
  2. Package Barefoot JAR. (Includes dependencies and executable main class.)

    mvn package -DskipTests
  3. Start server with standard configuration for map server and map matching, and option for GeoJSON output format.

    java -jar target/barefoot-0.1.5-matcher-jar-with-dependencies.jar --geojson config/server.properties config/harbin.properties

    Note: Stop server with Ctrl-c.

    Note: In case of 'parse errors', use the following Java options: -Duser.language=en -Duser.country=US

Reference

P. Newson and J. Krumm. Hidden Markov Map Matching Through Noise and Sparseness. In Proceedings of International Conference on Advances in Geographic Information Systems, 2009.

barefoot's People

Contributors

ben62920 avatar boathit avatar jodymarca avatar jongiddy avatar mmunko 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.