Database Service
Database service in Go for the GreenNav project
This repository contains code which follows the Design plan for database service
Setup Instructions:
Install golang and make sure it is present in the environment $PATH:
Check go env
to make sure everything is set.
- 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
- 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
- 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