mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-27 15:03:20 +03:00
47 lines
1.0 KiB
Protocol Buffer
47 lines
1.0 KiB
Protocol Buffer
syntax = "proto2";
|
|
|
|
package abstreet;
|
|
|
|
message Map {
|
|
repeated Road roads = 1;
|
|
repeated Intersection intersections = 2;
|
|
repeated Building buildings = 3;
|
|
repeated Parcel parcels = 4;
|
|
}
|
|
|
|
message Coordinate {
|
|
// y
|
|
required double latitude = 1;
|
|
// x
|
|
required double longitude = 2;
|
|
}
|
|
|
|
message Road {
|
|
repeated Coordinate points = 1;
|
|
// "key=value" format, for now
|
|
repeated string osm_tags = 2;
|
|
required int64 osm_way_id = 3;
|
|
}
|
|
|
|
message Intersection {
|
|
required Coordinate point = 1;
|
|
required double elevation_meters = 2;
|
|
required bool has_traffic_signal = 3;
|
|
}
|
|
|
|
// TODO identical to Road. worth representing these the same way?
|
|
message Building {
|
|
// last point never the first?
|
|
repeated Coordinate points = 1;
|
|
// "key=value" format, for now
|
|
repeated string osm_tags = 2;
|
|
required int64 osm_way_id = 3;
|
|
}
|
|
|
|
message Parcel {
|
|
// last point never the first?
|
|
repeated Coordinate points = 1;
|
|
// TODO decide what metadata from the shapefile is useful
|
|
// TODO associate a list of buildings with the parcel, assuming no building spans parcels
|
|
}
|