Skip to content

nav-e/service-database-deprecated-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Service

This is going to be the database service/tool, that feeds the OSM data as well as other sources into different databases to use them for routing.

The code is currently written in Go and is able to extract routing data from PBF files and storing it in a sqlite database.

Setup Instructions:

Install golang and make sure it is present in the environment $PATH:
Check go env to make sure everything is set.

  1. Get this package

go get -u github.com/Greennav/service-database


2. Fork the service-database repo and add new remote to your local copy of package
    ```bash
  cd $GOPATH/src/github.com/Greennav/service-database
  go get -u
  git remote add fork git@github.com:{GITHUB_USER}/service-database.git
  1. Go to the repository and run

go build database-service.go ./database-service -i importer/monaco.osm.pbf -f test.db sqlite3 test.db

    ```SQL
  sqlite> select count(*) from nodes;
  978
  1. Now you can push commits to your fork and then send PR

git commit -a -m "Very important fix" git push fork

  
## Current Status

The SQLite subpackage can import and write all nodes, ways and relations of a pbf file including tags. The nodes of a way are currently not imported somehow. Reading of the exported data from the database is completely missing; so is the REST-interface for queries and the PostgreSQL interface.

### Next Steps

- Make the import of the way's nodes work (sqlite/WriteWayNodes)
- Read the data from the database (sqlite/GetEverythingWithinCoordinates)
- Create a REST-interface and connect to sqlite/GetEverythingWithinCoordinates

About

Database service in Go for the GreenNav project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages