Map Format¶
MOSS designed a two-level road network data structure.
Intermediate GeoJSON format¶
The first level uses the (GeoJSON) standard, which can be readily converted from publicly available data sources.
RoadNet¶
RoadNet data consists of two types of geometric elements below.
LineString, corresponding toroadin mapMultiPoint, corresponding tojunctionin map
LineString type field description¶
Example
{
"type": "Feature",
"id": 25409666,
"geometry": {
"type": "LineString",
"coordinates": [
[
113.902208,
22.590202
],
[
113.894869,
22.59406
]
]
},
"properties": {
"id": 25409666,
"lanes": 3,
"highway": "motorway_link",
"max_speed": 8.333333333333334,
"name": "",
"turn": ["ALS","S","SR"], # Around, Left, Staright | Staright | Staright, Right
"width": 3.2
}
}
field |
type |
description |
|---|---|---|
geometry.coordinates |
list[list[float64]] |
The latitude and longitude coordinates of the |
properties.id |
int |
The original id of the |
properties.lanes |
int |
The number of |
properties.highway |
string |
Road level from OpenStreetMap (https://wiki.openstreetmap.org/wiki/Key:highway) |
properties.max_speed |
float64 |
The speed limit on this |
properties.name |
string |
Name of this |
properties.turn |
list[string] |
Optional field: A string representing the allowed turn types for each |
properties.width, properties.lanewidth |
float64 |
Width (in meters) of each |
properties.walk_lane_width |
float64 |
Optional field: Walk lane width (in meters) of each |
properties.walk_lane_offset |
float64 |
Optional field: The default offset between sidewalk and the |
MultiPoint type field description¶
Example
{
"type": "Feature",
"id": 50000000013,
"geometry": {
"type": "MultiPoint",
"coordinates": [
[
113.906995,
22.552684
]
]
},
"properties": {
"id": 50000000013,
"in_ways": [
974379908
],
"out_ways": [
25436150,
953806719
]
}
}
field |
type |
description |
|---|---|---|
geometry.coordinates |
list[list[float64]] |
The latitude and longitude coordinates of the |
properties.id |
int |
The original id of the |
properties.in_ways |
list[int] |
The original ids of all |
properties.out_ways |
list[int] |
The original ids of all |
AOIs¶
field |
type |
description |
|---|---|---|
geometry.coordinates |
list[list[list[float64]]] |
The latitude and longitude coordinates of the |
properties.id |
int |
The original id of the |
properties.osm_tags |
list[dict] |
The tags corresponding to the OSM (OpenStreetMap) data for the Area of Interest (AOI) may have a length greater than 1, as the AOI could be a result of merging multiple smaller AOIs. Currently, only five fields within the tags are processed: |
Example
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
31.129645,
29.976933
],
[
31.130864,
29.976937
],
[
31.131819,
29.97694
],
[
31.131828,
29.975046
],
[
31.129654,
29.975039
]
]
]
},
"properties": {
"id": 0,
"osm_tags": [
{
"landuse":"retail",
"name:en": "Pyramid of Khafre",
"name:zh": "卡夫拉金字塔",
}
]
}
}
POIs¶
field |
type |
description |
|---|---|---|
geometry.coordinates |
list[float64] |
The latitude and longitude coordinates of the |
properties.id |
int |
The original id of the |
properties.name |
string |
Name of this |
properties.catg |
string |
Category code, defined in (https://lbs.qq.com/service/webService/webServiceGuide/webServiceAppendix) |
Protobuf Map format¶
The second level is represented in (Protobuf) format, a compact binary format suitable for computer usage.
Header¶
Header contains meta data of this map
{
"class": "header",
"data": {
"name": "hangzhou",
"date": "Fri Aug 19 15:12:01 2023",
"north": 20047.15060441926,
"south": -32338.87769681991,
"west": -18106.391120057444,
"east": 23241.800579354865,
"projection": "+proj=tmerc +lat_0=30.2435 +lon_0=120.1648"
}
}
field |
type |
description |
|---|---|---|
data.name |
string |
Name of this map |
data.date |
string |
The time when this map was created |
data.north, data.south, data.west,data.east |
double |
Bounding box of this map |
data.taz_x_step, data.taz_y_step |
double |
Step size of the TAZ in the x and y direction |
data.projection |
string |
Proj.4 projection string |
Lane¶
{
"class": "lane",
"data": {
"id": 0,
"type": 1,
"turn": 1,
"max_speed": 11.11111111111111,
"length": 405.77050412705626,
"width": 3.2,
"center_line": {
"nodes": [
{
"x": -333.409877363847,
"y": 3892.689241038861
},
{
"x": -270.3333568115683,
"y": 3896.3202265304885
},
{
"x": -150.42210531337474,
"y": 3900.0537339189864
},
]
},
"predecessors": [
{
"id": 89785,
"type": 2
},
{
"id": 89788,
"type": 2
}
],
"successors": [
{
"id": 89790,
"type": 1
},
{
"id": 89791,
"type": 1
}
],
"left_lane_ids": [],
"right_lane_ids": [],
"parent_id": 200000000,
"overlaps": [],
"aoi_ids": [
500001796,
500010169,
500010170,
]
}
}
field |
type |
description |
|---|---|---|
data.id |
int |
Distinct id of this |
data.type |
int |
Type of this |
data.turn |
int |
Turn type of this |
data.max_speed |
float |
The speed limit on this |
data.length |
float |
The length of this |
data.width |
float |
The width of this |
data.center_line |
dict[string,list[dict]] |
Centerline geometry points of this |
data.predecessors, data.successors |
list[dict] |
Predecessor/successor |
data.left_lane_ids, data.right_lane_ids |
list[int] |
Left/Right adjacent |
data.parent_id |
int |
The |
data.overlaps |
list[dict] |
Overlap points between lanes (valid only within a |
data.aoi_ids |
list[int] |
All |
Road¶
{
"class": "road",
"data": {
"id": 200000000,
"lane_ids": [
0,
63893
],
}
}
field |
type |
description |
|---|---|---|
data.id |
int |
Distinct id of this |
data.lane_ids |
list[int] |
The ids of all |
Junction¶
{
"class": "junction",
"data": {
"id": 300000000,
"lane_ids": [
89785,
89786,
89787,
89788,
89789,
180968,
]
}
}
field |
type |
description |
|---|---|---|
data.id |
int |
Distinct id of this |
data.lane_ids |
list[int] |
The ids of all |
data.phases |
AvailablePhase |
Distinct id of this |
data.fixed_program |
TrafficLight |
The ids of all |
Traffic Light Format¶
message types |
field |
type |
description |
|---|---|---|---|
LightState |
enum |
0: unspecified; 1: red light; 2: green light 3: yellow light |
|
AvailablePhase |
states |
list[LightState] |
the feasible phase for max pressure algorithm, consisting of lighting control situation for each lane in the junction |
TrafficLight |
junction_id |
int |
the unique junction ID |
phases |
list[Phase] |
the lighting control situation of each lane in this phase, and the lane corresponds one-to-one with junction.lane_ids |
|
Phase |
duration |
float |
the phase duration time (seconds) |
states |
list[LightState] |
the lighting control situation of each lane in this phase, and the lane corresponds one-to-one with junction.lane_ids |
AOI¶
{
"class": "aoi",
"data": {
"id": 500000000,
"positions": [
{
"x": 871.8707642603008,
"y": 3971.670224670372
},
{
"x": 1145.657731407196,
"y": 4268.304979330834
},
{
"x": 1357.7498147156743,
"y": 4100.025863656549
},
{
"x": 871.8707642603008,
"y": 3971.670224670372
}
],
"area": 11961.66874272599,
"driving_positions": [
{
"lane_id": 9990,
"s": 222.80558616295468
}
],
"driving_gates": [
{
"x": 875.0335524878568,
"y": 3972.2371491341605
}
],
"walking_positions": [
{
"lane_id": 67871,
"s": 223.98105794200876
}
],
"walking_gates": [
{
"x": 878.1963407154128,
"y": 3972.8040735979494
}
],
"poi_ids":[],
"name": "国家大剧院",
"urban_land_use": "A2"
}
}
field |
type |
description |
|---|---|---|
data.id |
int |
Distinct id of this |
data.area |
float |
Area of this |
data.positions |
list[dict] |
Exterior geometry points of this |
data.driving_positions, data.walking_positions |
list[dict] |
The position of the connection point on the |
data.driving_gates, data.walking_gates |
list[dict] |
The entrances and exits connected to various lanes on the |
data.poi_ids |
list[int] |
All |
data.name |
string |
Name of this |
data.urban_land_use |
string |
Land use type, according to https://www.planning.org.cn/law/uploads/2013/1383993139.pdf |
POI¶
{
"class": "poi",
"data": {
"id": 700000000,
"name": "悦庭迷你",
"category": "111000",
"position": {
"x": 9198.956125039857,
"y": -15926.569325368913
},
"aoi_id": 500004914,
}
}
field |
type |
description |
|---|---|---|
data.id |
int |
Distinct id of this |
data.name |
string |
Name of this |
data.category |
string |
Category code, defined in (https://lbs.qq.com/service/webService/webServiceGuide/webServiceAppendix) |
data.positions |
dict[string,float] |
Point coordinate of this |
aoi_id |
int |
The id of the |