Skip to content
Snippets Groups Projects
Commit 158c5fc8 authored by theiled00's avatar theiled00
Browse files
parents 98bb2b5d ba68ec85
No related branches found
No related tags found
No related merge requests found
# Map data parser
## Basic architecture concept
![Architecture concept](documentation/architecture concept.png)
Legend:
* oval - data source
* blue oval - data generated by us
* rectangle - a service
* green outline - microservice
## Development
##### To generate classes from proto definition, one has to execute from the root directory
## General description
This application is intended to be ran as a Kron-job in Docker. It should run once every 24 hours and creates a road network,
which is based on OSM. OSM provides three types of element: nodes, ways and relations. Each element has a lot of meta data,
as well as tags that describe different features. The map data parser filters most of this data away.
Ways that represent streets are turned into segments and ways that represent buildings or other
objects are not used. Only the start and end nodes of segments are container within the road network and overlapping segments
are being split. The road type is defined by the `highway` tag.
Relations in OSM represent turn restrictions. The map builder considers only some of those, due to the complexity of certain
turn restrictions and the original scope of the project.
## Installation instructions
First, add an access key to the repo in the `settings.xml` of your Maven installation.
```xml
<servers>
<server>
<id>protos</id>
<configuration>
<httpHeaders>
<property>
<name>Private-Token</name>
<value>glpat-LUzA2H9fVytwNmmC-6MH</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
```
First install the protobuf compiler with :
Run `mvn clean install -U` to get all the dependencies and then run the application as you would in your IDE.
```sh
sudo apt install protobuf-compiler
```
The application writes a `roadnetwork.proto` file when it's done. This can then be used with the routing server or the debug
tool. Check the respective documentations for further information.
If you want to build the protos from source schema, you should use the command :
### Alternatively
```sh
protoc -I=./mapbuilder/src/main/java/map/builder/protos/ --java_out=./mapbuilder/src/main/java/ ./mapbuilder/src/main/java/map/builder/protos/schema/roadnetwork.proto
```
\ No newline at end of file
You can also use the Docker image and set it up the container in Docker.
\ No newline at end of file
package map.builder.osm;
import map.builder.osm.json.model.*;
import org.json.JSONObject;
import java.util.List;
import java.util.Objects;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment