Commit 6e4f58ea authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

Updated "Tools/Converters/geojson2vadere/geojson2vadere.py"

parent 9c467b36
Pipeline #272683 passed with stages
in 140 minutes and 26 seconds
...@@ -12,10 +12,6 @@ ...@@ -12,10 +12,6 @@
# #
# 4. Insert output into "topography" tab of Vadere. # 4. Insert output into "topography" tab of Vadere.
# #
# Watch out: before running this script, install its dependencies using pip:
#
# pip install -r requirements.txt
#
# Example GeoJSON file: # Example GeoJSON file:
# #
# { # {
...@@ -164,7 +160,7 @@ def create_vadere_obstacle_from_vertices(vertices): ...@@ -164,7 +160,7 @@ def create_vadere_obstacle_from_vertices(vertices):
return vadere_obstacle_as_string return vadere_obstacle_as_string
def create_vadere_topography_with_obstacles(obstacles, width, height): def create_vadere_topography_with_obstacles(obstacles, width, height):
with open("vadere_topography_template.txt", "r") as template_file: with open("vadere_topography.template", "r") as template_file:
vadere_topography_template = template_file.read() vadere_topography_template = template_file.read()
vadere_topography_string = Template(vadere_topography_template).substitute(obstacles=obstacles, width=width, height=height) vadere_topography_string = Template(vadere_topography_template).substitute(obstacles=obstacles, width=width, height=height)
......
...@@ -7,31 +7,44 @@ ...@@ -7,31 +7,44 @@
"height" : $height "height" : $height
}, },
"boundingBoxWidth" : 0.5, "boundingBoxWidth" : 0.5,
"bounded" : true "bounded" : true,
"referenceCoordinateSystem" : null
}, },
"obstacles" : [ $obstacles ], "obstacles" : [ $obstacles ],
"measurementAreas" : [ ],
"stairs" : [ ], "stairs" : [ ],
"targets" : [ ], "targets" : [ ],
"targetChangers" : [ ],
"absorbingAreas" : [ ],
"sources" : [ ], "sources" : [ ],
"dynamicElements" : [ ], "dynamicElements" : [ ],
"attributesPedestrian" : { "attributesPedestrian" : {
"radius" : 0.195, "radius" : 0.2,
"densityDependentSpeed" : false, "densityDependentSpeed" : false,
"speedDistributionMean" : 1.34, "speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26, "speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5, "minimumSpeed" : 0.5,
"maximumSpeed" : 2.2, "maximumSpeed" : 2.2,
"acceleration" : 2.0 "acceleration" : 2.0,
"footstepHistorySize" : 4,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 45.0
}, },
"teleporter" : null,
"attributesCar" : { "attributesCar" : {
"id" : -1, "id" : -1,
"radius" : 0.195, "radius" : 0.2,
"densityDependentSpeed" : false, "densityDependentSpeed" : false,
"speedDistributionMean" : 1.34, "speedDistributionMean" : 1.34,
"speedDistributionStandardDeviation" : 0.26, "speedDistributionStandardDeviation" : 0.26,
"minimumSpeed" : 0.5, "minimumSpeed" : 0.5,
"maximumSpeed" : 2.2, "maximumSpeed" : 2.2,
"acceleration" : 2.0, "acceleration" : 2.0,
"footstepHistorySize" : 4,
"searchRadius" : 1.0,
"walkingDirectionCalculation" : "BY_TARGET_CENTER",
"walkingDirectionSameIfAngleLessOrEqual" : 45.0,
"length" : 4.5, "length" : 4.5,
"width" : 1.7, "width" : 1.7,
"direction" : { "direction" : {
...@@ -39,4 +52,4 @@ ...@@ -39,4 +52,4 @@
"y" : 0.0 "y" : 0.0
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment