mimagiera / terator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trajectory-generator

Used library: https://github.com/osmlab/atlas

Each node contains tags. See: https://wiki.openstreetmap.org/wiki/Map_features

Sample tags:

{natural=saddle, name=Collada de Meners, mountain_pass=yes}
{parking=underground, amenity=parking, fee=yes, name=Aparcament Vinyes i Prat de la Creu, layer=-1}
{motorcycle=yes, barrier=lift_gate, bicycle=no, motorcar=yes, foot=no}
{highway=crossing, crossing=marked}

Convert osm to osm.pbf: https://wiki.openstreetmap.org/wiki/Osmconvert

.\osmconvert64-0.8.8p.exe map_kawalek.osm -o="map_kawalek.osm.pbf"

export .\osmosis-0.48.3\bin\osmosis --read-pbf .\malopolskie-latest.osm.pbf --bounding-box top=50.0768 left=19.8861 bottom=50.0522 right=19.9365 completeWays=yes --write-pbf krk_min.osm.pbf

How to develop

Prerequisites

  • Java 17
  • Gradle

Run from commandline

To run whole generator with optimization: run class ApplicationWithOptimization. It may take two positional arguments: number of generations to execute with the same set of parameters (default 1) and number of concurrent threads in which A* algorithm is executed for start and end point to find exact routes between them (default 1).

To run application with comparing data to single days with parameters from src/main/resources/var.tsv run class ApplicationWithCheckingDays. It may take argument with number of starting day with which results are compared to.

Run from jar

To build single jar file run gradle task shadowJar. Its main class (ApplicationWithOptimization or ApplicationWithCheckingDays) can be specified in build.gradle file in:

jar {
    manifest {
        attributes "Main-Class": "com.terator.ApplicationWithCheckingDays"
    }
}

Using different map

If using different map then krk_min.osm.pbf you need to specify its corners coordinates (i was unable to extract it from map file). It can be specified in: com.terator.service.generatorCreator.DataExtractor.extractCityEdgePoints

About


Languages

Language:Java 100.0%