Map Customization

This tool allows you to save customizations to the OpenStreetMap (OSM) data downloaded from a server and cached in a JSON-format file. A subsequent Rebuild operation will convert the customized OSM data extract into a V-Road file, which is then used for mesh generation and simulation. The V-Road file is binary and will load much faster into your application.

Step 1: Select OSM Source Map File

Browse to a JSON format file (extension .json) in the osm folder, normally located in %USERPROFILE%/AppData/LocalLow/VRoad/Data/

This file contains all nodes, ways and relations extracted from the OSM server. It also includes a latitude-longitude bounding box and a list of customizations.

Step 2: Play Scene 'CustomizeMap' to Build Map

You can use the Play button in the Map Customization window or the standard Editor play button: both have the same effect.

Step 3: In Scene View, select Point, Road or Footpath

You can select one of these elements by single-clicking on it in the scene view, or by clicking its name in the Hierarchy panel. Either method should highlight the element with an orange outline. To select a Road, select any of its lanes, or a sidewalk, if it has any.

Step 4: Specify a Customization for the Selected Element

Once an element has been selected, some customizations require additional parameters to be set. For example, Way Ignore does not need any additional parameters. By contrast, Point Move requires a 3-dimensional translation (East, North, Elevation). This translation can be set by dragging the point with the standard Unity handle, or by entering the values in the Map Customizer window. For other customizations, see the parameter descriptions below.

Step 5: Save the Customization

Once any parameters are set, a new customization can be saved to the OSM file by pressing the [Add Customization ] button, or the [ Modify ] button for existing ones. Point moves will be saved automatically once you deselect them. They can be reset using the [Delete Customization ] button.

Step 6: Stop and Rebuild the Model

Press [Stop and Rebuild] to stop the scene playing, and then restart it. This button is visible if there are no selections and there is at least one pending customization. This will re-convert the customized OSM data into a V-Road file.

Customizations for Selected Point

Centreline map points are derived from OSM nodes, and others are inserted as extra alignment controls, for example where ways cross. You can use standard Unity selection methods to select one or more points. Multiple selection is possible, either by dragging out a marquee box, or using control-click.

Point Move ( north, east, elevation )

The selected point will be moved by the given distances, after its base position is calculated by the conversion algorithm. This operation can be used to adjust the horizontal or vertical alignment of the centreline of a road or walkway. After moving a point, the approximate position of the resulting road lanes will be shown once the centreline is de-selected, but you will need to Stop and Rebuild to see the final position of the lanes, with shoulders, barriers, etc.



Customizations for Selected Footpath

For this group of customizations, the selection must be a footpath which is not beside a road, but one that is separate, sometimes referred to as a walkway or pedway. This type of footpath commonly runs through residential areas, shopping precincts, parks or other traffic-free areas in a city.

Way Ignore ( ) [No parameters]

On Rebuild, this (walk) way will not be converted into a footpath in the generated model. No meshes will be generated, and no pedestrians will use the walkway. If you are intending to use pedestrian simulation, it is better to remove the road using this method, to ensure there is no traffic here.



Way Set ( key, value )

Add an OSM tag to the selected Way, of the form key=value. The effect of this customization is almost identical to the tag having been specified in the original OSM data. A list of some possible keys is given, one of these can be selected, then a list of some possible values is presented. If the tag you want is not shown in the first list, select '+', then enter the tag and the required value. If the tag is shown, but the value you want is not shown, select '+' in the second list, then enter the required value.

As an example, this customization could be used to change the layer parameter, which controls if a walkway passes under or over other ways.



For a list of OSM tags, see references on the web page holding this document.

Customizations for Selected Road / Way

If an OSM Way is classified as a highway it will be converted either to a single road, or as a sequence of roads if it passes through any junctions. Any 'Road' customizations apply to a single road, whereas 'Way' customizations apply to all roads in a Way.

Way Ignore( ) [No parameters]

On Rebuild, this (road) Way will not be converted into road(s) in the generated model. No meshes will be generated, and no traffic will use the road. If you are intending to use traffic simulation, it is better to remove the road using this method, to ensure there is no traffic here.

If you just delete the generated road from the Prefab, the traffic simulation engine will still read the road definition from the V-Road file, and traffic will be appear in that location, even though no meshes exist for it in the Map Prefab.

Way Set ( key, value )

Add an OSM tag to the selected Way, of the form key=value. The effect of this customization is almost identical to the tag having been specified in the original OSM data. A list of some possible keys is given, one of these can be selected, then a list of some possible values is presented. If the tag you want is not shown in the first list, select '+', then enter the tag and the required value. If the tag is shown, but the value you want is not shown, select '+' in the second list, then enter the required value.

As an example, this customization could be used to change the number of lanes of all roads in a Way, if the Way has been split into multiple roads.

For a list of OSM tags, see references on the web page holding this document.

Road Set ( attribute, value )

Specify a value for an attribute on the selected road only. This is similar to the specification of Way Set, but in this case the attributes are not OSM tags but are limited to the list below. As an example, specifying lanes=3 will set only the selected section of road to 3 lanes, even if the same way continues over the junction at the end of this road.



attribute

value

description

lanes

(integer > 0)

How many lanes on this road?

sidewalk

left|right|both|none

Are there sidewalks beside this road?

crossing

start|end|both|none

Are there pedestrian crossings on this road?

parking

none|forced

Are there parking bays on this road?

barrier

left|right|none

Are there barriers beside this road?