Skip to content

osmottawa/Golf-Cart-Path

Repository files navigation

Golf Cart routing API

The Villages Data

Google Maps which shows all the following features:

  • Golf Cart Paths
  • Pools
  • Villas
  • Golf Clubs
  • Basket ball courts

Other Related websites

Using Graphhopper

The Graphhopper API explains each parameters.

Here's an example with TheVillages routing API.

http://52.5.34.35:8888/route?point=28.938158,-82.007446&point=28.915922,-81.999893&vehicle=golfcart&locale=en-US&type=json&points_encoded=false

  • sourcelat, sourcelng = (point=28.938158,-82.007446)
  • destlat, destlng = (point=28.915922,-81.999893)

API Testing

OSM Tasking Manager

Build the API

All the files to build at latest Graphhopper build for the Golf cart routing can be found here:

https://github.com/osmottawa/Golf-Cart-Path

You would simply do the following Makefile commands.

$ git clone https://github.com/osmottawa/Golf-Cart-Path
$ cd Golf-Cart-Path/graphhopper
$ ./thevillages.sh init
$ ./thevillages.sh update
$ ./thevillages.sh start

Once everything works perfectly, you can run the automatic updater that will download the latest GeoFabrik dataset of Florida every 60 minutes. This process will run in the background.

$ nohup ./thevillages.sh auto &

This will initiate a new Graphhopper instance on port 8888.

All of the commands are based on an Ubuntu OS, so CentOS will have a few issues running this.

Amazon Server

We set up an Amazon Test Server dedicated for Graphhopper (http://52.5.34.35:8888/).

You should be able to log in using this Private Key.

$ sudo chmod 700 TheVillages.pem
$ ssh -i TheVillages.pem ubuntu@52.5.34.35

Update OSM Data

To update at the latest minute the OSM dataset, here is the following commands.

$ osmupdate florida-latest.osm.pbf florida-update.osm.pbf
$ osmosis --read-pbf file="florida-update.osm.pbf" --write-pbf file="florida-latest.osm.pbf"
$ ./graphhopper import florida-latest.osm.pbf