Skip to content
Snippets Groups Projects
Commit ae8672de authored by lazarog98's avatar lazarog98
Browse files

Resolve "Add documentation to readme"

parent 8433bbe1
No related branches found
No related tags found
1 merge request!30Resolve "Add documentation to readme"
# Map data parser # Map data parser
## Basic architecture concept ## General description
![Architecture concept](documentation/architecture concept.png) 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,
Legend: as well as tags that describe different features. The map data parser filters most of this data away.
* oval - data source
* blue oval - data generated by us Ways that represent streets are turned into segments and ways that represent buildings or other
* rectangle - a service objects are not used. Only the start and end nodes of segments are container within the road network and overlapping segments
* green outline - microservice are being split. The road type is defined by the `highway` tag.
## Development 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.
##### To generate classes from proto definition, one has to execute from the root directory
## 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 The application writes a `roadnetwork.proto` file when it's done. This can then be used with the routing server or the debug
sudo apt install protobuf-compiler 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 You can also use the Docker image and set it up the container in Docker.
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
```
\ No newline at end of file
package map.builder.osm; package map.builder.osm;
import map.builder.osm.json.model.*; import map.builder.osm.json.model.*;
import org.json.JSONObject;
import java.util.List; import java.util.List;
import java.util.Objects; 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