Giter Site home page Giter Site logo

graphhopper-postgis's Introduction

GraphHopper Postgis reader

This repository is based on the work by mbasa and by PGWelch.

Please note, this is a module for GraphHopper, you will need to combine it with GraphHopper.

To get an idea of how to use it, have a look at the OSMPostgisReaderTest.

Setup Postgres

Create a Table or View in the specifed database and schema that has these necessary columns (refer to OSM documentation for the proper values of these columns) :

osm_id, maxspeed, oneway, fclass, name, geom 

Furthermore you can add more attributes and refer them in the config key db.tagsToCopy. These tags will be copied to the ReaderWay that you can use in your FlagEncoder.

For example:

 create view philview 
   (osm_id,maxspeed,oneway,fclass,name,geom ) 
   as select id,0,oneway,'tertiary'::text,name,geom from phil;

Start GraphHopper

Please note, these instructions are only valid if you add this module to the main GraphHopper. I'd recommend to set it up along the lines of the GraphHopper MapMatching Repository.

Start the GraphHopper server by adding the parameter /<path where graph will reside>/<table or view name>. The example below will create a graph, philview-gh, in /Users/mbasa/t for the philveiw view of PostgreSQL:

./graphhopper.sh web /Users/mbasa/t/philview

Updating the Graph

If the data in PostgreSQL changes and the graph has to be updated, just delete the created graph directory and restart GraphHopper using the above method.

graphhopper-postgis's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphhopper-postgis's Issues

PostGIS reader usage

Hello!
I am really keen to try the module,
but not familiar with java development,
so provided description is insufficient for me
to set up and use the module.
Is it possible to integrate it to the main Graphhopper
without java programming? Which config files should be altered?
Thanks for your time!

Version 4.0 of GraphHopper

Hi, just created a postgis reader for V4.0, which you might be interested in. With this reader, I am able to get 3rd party road networks woking in the 4.0 version of GraphHopper.

Source is here.

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.