Implement an OpenStreetMap to VADERE topology converter (OPMOPS)
Use case:
- Select an area of interest at www.openstreetmap.org (defined by an origin as longitude and latitude and a bounding box).
- The script gets longitude, latitude and bounding box as input parameter from (1), fetches the data from www.openstreetmap.org.
- Then, the script converts this data into a valid VADERE topology description (see below).
"topography" : {
"attributes" : {
"bounds" : {
"x" : 0.0,
"y" : 0.0,
"width" : 38.0,
"height" : 12.0
},
"boundingBoxWidth" : 0.5,
"bounded" : true
},
"obstacles" : [ {
"shape" : {
"type" : "POLYGON",
"points" : [ {
"x" : 9.0,
"y" : 12.0
}, {
"x" : 9.0,
"y" : 10.0
}, {
"x" : 30.0,
"y" : 7.0
}, {
"x" : 30.0,
"y" : 12.0
} ]
},
"id" : -1
},
...
Notes:
- Use Python for implementation.
- Fetched data from www.openstreetmap.org must be filtered (I guess only objects of type
housing
are relevant). - Write unit tests where necessary.