From 4370190890ebcdd5d364f8a207014db35158d91a Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 14:37:30 -0700 Subject: [PATCH 01/10] Updated to temporary tile location Context: https://github.com/sharedstreets/sharedstreets-builder/issues/10#issuecomment-374067708 --- sharedstreets/tile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharedstreets/tile.py b/sharedstreets/tile.py index 7e0ca1a..069c104 100644 --- a/sharedstreets/tile.py +++ b/sharedstreets/tile.py @@ -6,7 +6,7 @@ logger = logging.getLogger(__name__) # https://github.com/sharedstreets/sharedstreets-ref-system/issues/16 -data_url_template, data_zoom = 'https://tiles.sharedstreets.io/{z}-{x}-{y}.{layer}.pbf', 12 +data_url_template, data_zoom = 'https://tiles.sharedstreets.io/planet-180312/{z}-{x}-{y}.{layer}.pbf', 12 data_classes = { 'reference': sharedstreets_pb2.SharedStreetsReference, 'intersection': sharedstreets_pb2.SharedStreetsIntersection, From f90ca298d484f665db44edac05f89026f7a00f22 Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 15:06:38 -0700 Subject: [PATCH 02/10] Started to incorporate new tile data Need to re-generate Python protobuf code from new .proto file. --- sharedstreets/read.py | 7 +++++++ sharedstreets/tests/data/geometry.pbf | 13 ++++++------- sharedstreets/tests/test_tile.py | 16 ++++++++-------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/sharedstreets/read.py b/sharedstreets/read.py index 577e6e2..587266f 100644 --- a/sharedstreets/read.py +++ b/sharedstreets/read.py @@ -22,11 +22,16 @@ def main(): buffer = file.read() n = 0 while n < len(buffer): + print('=' * 80) + print('bytes', n, end=' ') + msg_len, new_pos = _DecodeVarint32(buffer, n) n = new_pos msg_buf = buffer[n:n+msg_len] n += msg_len + print('to', n, '--', msg_buf[:12].hex(), '...', msg_buf[-12:].hex()) + if ProtobufClass is None: for ProtobufClass in protobuf_classes: test_object = ProtobufClass() @@ -45,6 +50,8 @@ def main(): print('ok:', ProtobufClass) break + print(' -' * 40) + object = ProtobufClass() object.ParseFromString(msg_buf) print(object) diff --git a/sharedstreets/tests/data/geometry.pbf b/sharedstreets/tests/data/geometry.pbf index 35322de..1e0746d 100644 --- a/sharedstreets/tests/data/geometry.pbf +++ b/sharedstreets/tests/data/geometry.pbf @@ -1,7 +1,6 @@ - - 809235c41285600f26c3bb390a99f344 cf319bbba2a851a17fef70558dbe54ff b21b5e9166f8c77534896247c7143527" c2692e4b4ce5551a08d21bcb018c92a70:@ ґ^U -B@C~+Б^ǃ-vB@%^tB@ɳ˷^xB@ - 802f5d102ca9351370a7baa86b0a3ffe 600b91143e1bf922d7fbe016d5eef650 a602006b9eef95dc9ae603832b01f0fa" 55150464fa72ca89eb7283a3cd810bb5* df682aec802c413ee186322d11ced42e0: OK=^cM -KB@qIJ;^N -PB@ - 8072396f545c82abcb34bd5124c4ba6d ba2a07acec76b703e467c44dfdb0b267 52a9d137f2ccb5479ca7c5e899b8c8f7" 1f5ab6204f32b76ebacbaadd659a15480:0`H@^ifKB@Bz^x'-\B@O^ N3^B@ \ No newline at end of file + + 80832506185371acf24df519ce271d31 bd188f40bcf79a5f0ea449d517634256 bcf50f7542fa573650bb988664e29a61" d972d167f9874b1367961cbd5c8cba04* 157e6746fc5ed0df77971ca8c7831f270:PV2[ ^+~B@Qʒ^nB@’^|ޯB@CY’^f +B@K^6B@ + 80a8a7c120332bfb679f877472c9c18d b538bf59f065f54cf3c6f6113870c0ea dccf37896f270405fe288e9c6ec20422" 4bc556d4b905bb2bf789d77ea257c9f1* 09af6339fc020e47daf0039176308e890: r9^~8h +B@- ؒ^= B@ + 82b5776e9fcce1c64a431a14bd59b15d ccc0fe7c9d2a9b1836ffe2d88ceceacb cf1838fe859aceec5f54bad0c35e3731" bad3720e86397a9164ea532c2d209ac70:j1^B@Qo!4^#01B@-V4^-B@㡔5^r?B@G6^A{B@gh6^~ B@#7^:B@[Xk8^OB@ \ No newline at end of file diff --git a/sharedstreets/tests/test_tile.py b/sharedstreets/tests/test_tile.py index 1f3cffa..3649806 100644 --- a/sharedstreets/tests/test_tile.py +++ b/sharedstreets/tests/test_tile.py @@ -36,17 +36,17 @@ def test_iter_objects_geometry(self): tile.data_classes['geometry']) g1, g2, g3 = list(geometries) - self.assertEqual(g1.id, '809235c41285600f26c3bb390a99f344') - self.assertEqual(g1.lonlats[0:2], [-122.2784457, 37.8045933]) - self.assertEqual(len(g1.lonlats), 8) + self.assertEqual(g1.id, '80832506185371acf24df519ce271d31') + self.assertEqual(g1.lonlats[0:2], [-122.2951692, 37.8564139]) + self.assertEqual(len(g1.lonlats), 10) - self.assertEqual(g2.id, '802f5d102ca9351370a7baa86b0a3ffe') - self.assertEqual(g2.lonlats[0:2], [-122.28499110000001, 37.8226026]) + self.assertEqual(g2.id, '80a8a7c120332bfb679f877472c9c18d') + self.assertEqual(g2.lonlats[0:2], [-122.2926467, 37.7971926]) self.assertEqual(len(g2.lonlats), 4) - self.assertEqual(g3.id, '8072396f545c82abcb34bd5124c4ba6d') - self.assertEqual(g3.lonlats[0:2], [-122.25996420000001, 37.853876400000004]) - self.assertEqual(len(g3.lonlats), 6) + self.assertEqual(g3.id, '82b5776e9fcce1c64a431a14bd59b15d') + self.assertEqual(g3.lonlats[0:2], [-122.28428740000001, 37.827691900000005]) + self.assertEqual(len(g3.lonlats), 16) def test_iter_objects_reference(self): From 8a632d02cf9c18b0c86616ee9246e3f82337804c Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 20:14:27 -0700 Subject: [PATCH 03/10] Updated to latest protobuf version https://github.com/sharedstreets/sharedstreets-ref-system/tree/03eba5a7e201/proto --- sharedstreets/sharedstreets_pb2.py | 52 +++++++++++++++++++----------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/sharedstreets/sharedstreets_pb2.py b/sharedstreets/sharedstreets_pb2.py index 2dd81e9..8d71a13 100644 --- a/sharedstreets/sharedstreets_pb2.py +++ b/sharedstreets/sharedstreets_pb2.py @@ -20,7 +20,7 @@ name='sharedstreets.proto', package='', syntax='proto3', - serialized_pb=_b('\n\x13sharedstreets.proto\"\x1b\n\tDelimiter\x12\x0e\n\x06length\x18\x01 \x01(\r\"B\n\x12GISSectionMetadata\x12\x11\n\tsectionId\x18\x01 \x01(\t\x12\x19\n\x11sectionProperties\x18\x02 \x01(\t\"D\n\x0bGISMetadata\x12\x0e\n\x06source\x18\x01 \x01(\t\x12%\n\x08sections\x18\x02 \x03(\x0b\x32\x13.GISSectionMetadata\"}\n\nWaySection\x12\r\n\x05wayId\x18\x01 \x01(\x04\x12\x1d\n\troadClass\x18\x02 \x01(\x0e\x32\n.RoadClass\x12\x0e\n\x06oneWay\x18\x03 \x01(\x08\x12\x12\n\nroundabout\x18\x04 \x01(\x08\x12\x0c\n\x04link\x18\x05 \x01(\x08\x12\x0f\n\x07nodeIds\x18\x06 \x03(\x04\"/\n\x0bOSMMetadata\x12 \n\x0bwaySections\x18\x01 \x03(\x0b\x32\x0b.WaySection\"q\n\x15SharedStreetsMetadata\x12\x12\n\ngeometryId\x18\x01 \x01(\t\x12!\n\x0bosmMetadata\x18\x02 \x01(\x0b\x32\x0c.OSMMetadata\x12!\n\x0bgisMetadata\x18\x03 \x03(\x0b\x32\x0c.GISMetadata\"\xbe\x01\n\x15SharedStreetsGeometry\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1a\n\x12\x66romIntersectionId\x18\x02 \x01(\t\x12\x18\n\x10toIntersectionId\x18\x03 \x01(\t\x12\x1a\n\x12\x66orwardReferenceId\x18\x04 \x01(\t\x12\x17\n\x0f\x62\x61\x63kReferenceId\x18\x05 \x01(\t\x12\x1d\n\troadClass\x18\x06 \x01(\x0e\x32\n.RoadClass\x12\x0f\n\x07lonlats\x18\x07 \x03(\x01\"\xe9\x01\n\x11LocationReference\x12\x16\n\x0eintersectionId\x18\x01 \x01(\t\x12\x0b\n\x03lon\x18\x02 \x01(\x01\x12\x0b\n\x03lat\x18\x03 \x01(\x01\x12\x18\n\x0einboundBearing\x18\x04 \x01(\x05H\x00\x12\x19\n\x0foutboundBearing\x18\x05 \x01(\x05H\x01\x12\x1b\n\x11\x64istanceToNextRef\x18\x06 \x01(\x05H\x02\x42\x18\n\x16inboundBearing_presentB\x19\n\x17outboundBearing_presentB\x1b\n\x19\x64istanceToNextRef_present\"\xb5\x02\n\x16SharedStreetsReference\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\ngeometryId\x18\x02 \x01(\t\x12\x34\n\tformOfWay\x18\x03 \x01(\x0e\x32!.SharedStreetsReference.FormOfWay\x12.\n\x12locationReferences\x18\x04 \x03(\x0b\x32\x12.LocationReference\"\x94\x01\n\tFormOfWay\x12\r\n\tUndefined\x10\x00\x12\x0c\n\x08Motorway\x10\x01\x12\x17\n\x13MultipleCarriageway\x10\x02\x12\x15\n\x11SingleCarriageway\x10\x03\x12\x0e\n\nRoundabout\x10\x04\x12\x11\n\rTrafficSquare\x10\x05\x12\x0c\n\x08SlipRoad\x10\x06\x12\t\n\x05Other\x10\x07\"\x8c\x01\n\x19SharedStreetsIntersection\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06nodeId\x18\x02 \x01(\x04\x12\x0b\n\x03lon\x18\x03 \x01(\x01\x12\x0b\n\x03lat\x18\x04 \x01(\x01\x12\x1b\n\x13inboundReferenceIds\x18\x05 \x03(\t\x12\x1c\n\x14outboundReferenceIds\x18\x06 \x03(\t*\x89\x01\n\tRoadClass\x12\x0c\n\x08Motorway\x10\x00\x12\t\n\x05Trunk\x10\x01\x12\x0b\n\x07Primary\x10\x02\x12\r\n\tSecondary\x10\x03\x12\x0c\n\x08Tertiary\x10\x04\x12\x0f\n\x0bResidential\x10\x05\x12\x10\n\x0cUnclassified\x10\x06\x12\x0b\n\x07Service\x10\x07\x12\t\n\x05Other\x10\x08\x42\x14\x42\x12SharedStreetsProtob\x06proto3') + serialized_pb=_b('\n\x13sharedstreets.proto\"\x1b\n\tDelimiter\x12\x0e\n\x06length\x18\x01 \x01(\r\"B\n\x12GISSectionMetadata\x12\x11\n\tsectionId\x18\x01 \x01(\t\x12\x19\n\x11sectionProperties\x18\x02 \x01(\t\"D\n\x0bGISMetadata\x12\x0e\n\x06source\x18\x01 \x01(\t\x12%\n\x08sections\x18\x02 \x03(\x0b\x32\x13.GISSectionMetadata\"\x8b\x01\n\nWaySection\x12\r\n\x05wayId\x18\x01 \x01(\x04\x12\x1d\n\troadClass\x18\x02 \x01(\x0e\x32\n.RoadClass\x12\x0e\n\x06oneWay\x18\x03 \x01(\x08\x12\x12\n\nroundabout\x18\x04 \x01(\x08\x12\x0c\n\x04link\x18\x05 \x01(\x08\x12\x0f\n\x07nodeIds\x18\x06 \x03(\x04\x12\x0c\n\x04name\x18\x07 \x01(\t\"=\n\x0bOSMMetadata\x12 \n\x0bwaySections\x18\x01 \x03(\x0b\x32\x0b.WaySection\x12\x0c\n\x04name\x18\x02 \x01(\t\"q\n\x15SharedStreetsMetadata\x12\x12\n\ngeometryId\x18\x01 \x01(\t\x12!\n\x0bosmMetadata\x18\x02 \x01(\x0b\x32\x0c.OSMMetadata\x12!\n\x0bgisMetadata\x18\x03 \x03(\x0b\x32\x0c.GISMetadata\"\xbe\x01\n\x15SharedStreetsGeometry\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1a\n\x12\x66romIntersectionId\x18\x02 \x01(\t\x12\x18\n\x10toIntersectionId\x18\x03 \x01(\t\x12\x1a\n\x12\x66orwardReferenceId\x18\x04 \x01(\t\x12\x17\n\x0f\x62\x61\x63kReferenceId\x18\x05 \x01(\t\x12\x1d\n\troadClass\x18\x06 \x01(\x0e\x32\n.RoadClass\x12\x0f\n\x07lonlats\x18\x07 \x03(\x01\"\xe9\x01\n\x11LocationReference\x12\x16\n\x0eintersectionId\x18\x01 \x01(\t\x12\x0b\n\x03lon\x18\x02 \x01(\x01\x12\x0b\n\x03lat\x18\x03 \x01(\x01\x12\x18\n\x0einboundBearing\x18\x04 \x01(\x05H\x00\x12\x19\n\x0foutboundBearing\x18\x05 \x01(\x05H\x01\x12\x1b\n\x11\x64istanceToNextRef\x18\x06 \x01(\x05H\x02\x42\x18\n\x16inboundBearing_presentB\x19\n\x17outboundBearing_presentB\x1b\n\x19\x64istanceToNextRef_present\"\xb5\x02\n\x16SharedStreetsReference\x12\n\n\x02id\x18\x01 \x01(\t\x12\x12\n\ngeometryId\x18\x02 \x01(\t\x12\x34\n\tformOfWay\x18\x03 \x01(\x0e\x32!.SharedStreetsReference.FormOfWay\x12.\n\x12locationReferences\x18\x04 \x03(\x0b\x32\x12.LocationReference\"\x94\x01\n\tFormOfWay\x12\r\n\tUndefined\x10\x00\x12\x0c\n\x08Motorway\x10\x01\x12\x17\n\x13MultipleCarriageway\x10\x02\x12\x15\n\x11SingleCarriageway\x10\x03\x12\x0e\n\nRoundabout\x10\x04\x12\x11\n\rTrafficSquare\x10\x05\x12\x0c\n\x08SlipRoad\x10\x06\x12\t\n\x05Other\x10\x07\"\x8c\x01\n\x19SharedStreetsIntersection\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06nodeId\x18\x02 \x01(\x04\x12\x0b\n\x03lon\x18\x03 \x01(\x01\x12\x0b\n\x03lat\x18\x04 \x01(\x01\x12\x1b\n\x13inboundReferenceIds\x18\x05 \x03(\t\x12\x1c\n\x14outboundReferenceIds\x18\x06 \x03(\t*\x89\x01\n\tRoadClass\x12\x0c\n\x08Motorway\x10\x00\x12\t\n\x05Trunk\x10\x01\x12\x0b\n\x07Primary\x10\x02\x12\r\n\tSecondary\x10\x03\x12\x0c\n\x08Tertiary\x10\x04\x12\x0f\n\x0bResidential\x10\x05\x12\x10\n\x0cUnclassified\x10\x06\x12\x0b\n\x07Service\x10\x07\x12\t\n\x05Other\x10\x08\x42\x14\x42\x12SharedStreetsProtob\x06proto3') ) _ROADCLASS = _descriptor.EnumDescriptor( @@ -68,8 +68,8 @@ ], containing_type=None, options=None, - serialized_start=1366, - serialized_end=1503, + serialized_start=1395, + serialized_end=1532, ) _sym_db.RegisterEnumDescriptor(_ROADCLASS) @@ -126,8 +126,8 @@ ], containing_type=None, options=None, - serialized_start=1072, - serialized_end=1220, + serialized_start=1101, + serialized_end=1249, ) _sym_db.RegisterEnumDescriptor(_SHAREDSTREETSREFERENCE_FORMOFWAY) @@ -288,6 +288,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='WaySection.name', index=6, + number=7, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -300,8 +307,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=190, - serialized_end=315, + serialized_start=191, + serialized_end=330, ) @@ -319,6 +326,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='name', full_name='OSMMetadata.name', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=_b("").decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -331,8 +345,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=317, - serialized_end=364, + serialized_start=332, + serialized_end=393, ) @@ -376,8 +390,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=366, - serialized_end=479, + serialized_start=395, + serialized_end=508, ) @@ -449,8 +463,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=482, - serialized_end=672, + serialized_start=511, + serialized_end=701, ) @@ -524,8 +538,8 @@ name='distanceToNextRef_present', full_name='LocationReference.distanceToNextRef_present', index=2, containing_type=None, fields=[]), ], - serialized_start=675, - serialized_end=908, + serialized_start=704, + serialized_end=937, ) @@ -577,8 +591,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=911, - serialized_end=1220, + serialized_start=940, + serialized_end=1249, ) @@ -643,8 +657,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1223, - serialized_end=1363, + serialized_start=1252, + serialized_end=1392, ) _GISMETADATA.fields_by_name['sections'].message_type = _GISSECTIONMETADATA From 445308f1b3853b13946a2a8eb50358da2f83939e Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 21:07:49 -0700 Subject: [PATCH 04/10] Differentiated old and new geometry PBF samples --- .../tests/data/geometry-20180307.pbf | 7 ++++ .../{geometry.pbf => geometry-20180312.pbf} | 0 sharedstreets/tests/test_tile.py | 39 ++++++++++++++----- 3 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 sharedstreets/tests/data/geometry-20180307.pbf rename sharedstreets/tests/data/{geometry.pbf => geometry-20180312.pbf} (100%) diff --git a/sharedstreets/tests/data/geometry-20180307.pbf b/sharedstreets/tests/data/geometry-20180307.pbf new file mode 100644 index 0000000..35322de --- /dev/null +++ b/sharedstreets/tests/data/geometry-20180307.pbf @@ -0,0 +1,7 @@ + + 809235c41285600f26c3bb390a99f344 cf319bbba2a851a17fef70558dbe54ff b21b5e9166f8c77534896247c7143527" c2692e4b4ce5551a08d21bcb018c92a70:@ ґ^U +B@C~+Б^ǃ-vB@%^tB@ɳ˷^xB@ + 802f5d102ca9351370a7baa86b0a3ffe 600b91143e1bf922d7fbe016d5eef650 a602006b9eef95dc9ae603832b01f0fa" 55150464fa72ca89eb7283a3cd810bb5* df682aec802c413ee186322d11ced42e0: OK=^cM +KB@qIJ;^N +PB@ + 8072396f545c82abcb34bd5124c4ba6d ba2a07acec76b703e467c44dfdb0b267 52a9d137f2ccb5479ca7c5e899b8c8f7" 1f5ab6204f32b76ebacbaadd659a15480:0`H@^ifKB@Bz^x'-\B@O^ N3^B@ \ No newline at end of file diff --git a/sharedstreets/tests/data/geometry.pbf b/sharedstreets/tests/data/geometry-20180312.pbf similarity index 100% rename from sharedstreets/tests/data/geometry.pbf rename to sharedstreets/tests/data/geometry-20180312.pbf diff --git a/sharedstreets/tests/test_tile.py b/sharedstreets/tests/test_tile.py index 3649806..e2bfbaa 100644 --- a/sharedstreets/tests/test_tile.py +++ b/sharedstreets/tests/test_tile.py @@ -13,6 +13,25 @@ def respond_locally(url, request): class TestTile (unittest.TestCase): + def test_iter_objects_geometry_20180312(self): + + with httmock.HTTMock(respond_locally): + geometries = tile.iter_objects('http://example.com/geometry-20180312.pbf', + tile.data_classes['geometry']) + g1, g2, g3 = list(geometries) + + self.assertEqual(g1.id, '80832506185371acf24df519ce271d31') + self.assertEqual(g1.lonlats[0:2], [-122.2951692, 37.8564139]) + self.assertEqual(len(g1.lonlats), 10) + + self.assertEqual(g2.id, '80a8a7c120332bfb679f877472c9c18d') + self.assertEqual(g2.lonlats[0:2], [-122.2926467, 37.7971926]) + self.assertEqual(len(g2.lonlats), 4) + + self.assertEqual(g3.id, '82b5776e9fcce1c64a431a14bd59b15d') + self.assertEqual(g3.lonlats[0:2], [-122.28428740000001, 37.827691900000005]) + self.assertEqual(len(g3.lonlats), 16) + def test_iter_objects_intersection(self): with httmock.HTTMock(respond_locally): @@ -32,21 +51,21 @@ def test_iter_objects_intersection(self): def test_iter_objects_geometry(self): with httmock.HTTMock(respond_locally): - geometries = tile.iter_objects('http://example.com/geometry.pbf', + geometries = tile.iter_objects('http://example.com/geometry-20180307.pbf', tile.data_classes['geometry']) g1, g2, g3 = list(geometries) - self.assertEqual(g1.id, '80832506185371acf24df519ce271d31') - self.assertEqual(g1.lonlats[0:2], [-122.2951692, 37.8564139]) - self.assertEqual(len(g1.lonlats), 10) + self.assertEqual(g1.id, '809235c41285600f26c3bb390a99f344') + self.assertEqual(g1.lonlats[0:2], [-122.2784457, 37.8045933]) + self.assertEqual(len(g1.lonlats), 8) - self.assertEqual(g2.id, '80a8a7c120332bfb679f877472c9c18d') - self.assertEqual(g2.lonlats[0:2], [-122.2926467, 37.7971926]) + self.assertEqual(g2.id, '802f5d102ca9351370a7baa86b0a3ffe') + self.assertEqual(g2.lonlats[0:2], [-122.28499110000001, 37.8226026]) self.assertEqual(len(g2.lonlats), 4) - self.assertEqual(g3.id, '82b5776e9fcce1c64a431a14bd59b15d') - self.assertEqual(g3.lonlats[0:2], [-122.28428740000001, 37.827691900000005]) - self.assertEqual(len(g3.lonlats), 16) + self.assertEqual(g3.id, '8072396f545c82abcb34bd5124c4ba6d') + self.assertEqual(g3.lonlats[0:2], [-122.25996420000001, 37.853876400000004]) + self.assertEqual(len(g3.lonlats), 6) def test_iter_objects_reference(self): @@ -95,7 +114,7 @@ def test_iter_objects_metadata(self): def test_is_inside(self): with httmock.HTTMock(respond_locally): - geometries = tile.iter_objects('http://example.com/geometry.pbf', + geometries = tile.iter_objects('http://example.com/geometry-20180307.pbf', tile.data_classes['geometry']) # 11th Street between Castro & MLK From a92c7f581af9e35cf23d4bbec6d7fd90c2870fb6 Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 21:14:24 -0700 Subject: [PATCH 05/10] Added new intersection PBF sample --- ...rsection.pbf => intersection-20180307.pbf} | 0 .../tests/data/intersection-20180312.pbf | 4 ++++ sharedstreets/tests/test_tile.py | 22 ++++++++++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) rename sharedstreets/tests/data/{intersection.pbf => intersection-20180307.pbf} (100%) create mode 100644 sharedstreets/tests/data/intersection-20180312.pbf diff --git a/sharedstreets/tests/data/intersection.pbf b/sharedstreets/tests/data/intersection-20180307.pbf similarity index 100% rename from sharedstreets/tests/data/intersection.pbf rename to sharedstreets/tests/data/intersection-20180307.pbf diff --git a/sharedstreets/tests/data/intersection-20180312.pbf b/sharedstreets/tests/data/intersection-20180312.pbf new file mode 100644 index 0000000..a55a6c7 --- /dev/null +++ b/sharedstreets/tests/data/intersection-20180312.pbf @@ -0,0 +1,4 @@ + + 80ff395c936bb42f328b1eb872174ea9Բګ^!~HB@* 5a7b79e6b6bb2e4e66e436c1aa973342* d0ca85d13b170d468ac5b00d1fd8aad92 0da054dff7510a1e4f9d80bda17e844c~ + 81b8be7e93822aa8aec950aec959bfd8©]~y^!ucB@* f76daca404bbf712ce3031b537ac000e2 d0651bbbfa5f63ca952d38cfb8641bab + 81966cd8b3352f5b819009bffb0ff6c1ͧ2h^!)B@* 712284b01661708e941a730d059be17f* 0fb5dc53986ecdcce8710a7c702822402 98199156d499a69bd23538fb5fea30712 d19a3e4b75cfdc353c55b163048ddd40 \ No newline at end of file diff --git a/sharedstreets/tests/test_tile.py b/sharedstreets/tests/test_tile.py index e2bfbaa..c452c50 100644 --- a/sharedstreets/tests/test_tile.py +++ b/sharedstreets/tests/test_tile.py @@ -13,6 +13,22 @@ def respond_locally(url, request): class TestTile (unittest.TestCase): + def test_iter_objects_intersection_20180312(self): + + with httmock.HTTMock(respond_locally): + intersections = tile.iter_objects('http://example.com/intersection-20180312.pbf', + tile.data_classes['intersection']) + i1, i2, i3 = list(intersections) + + self.assertEqual(i1.id, '80ff395c936bb42f328b1eb872174ea9') + self.assertEqual((i1.lon, i1.lat), (-122.26048920000001, 37.8110133)) + + self.assertEqual(i2.id, '81b8be7e93822aa8aec950aec959bfd8') + self.assertEqual((i2.lon, i2.lat), (-122.2730403, 37.8311603)) + + self.assertEqual(i3.id, '81966cd8b3352f5b819009bffb0ff6c1') + self.assertEqual((i3.lon, i3.lat), (-122.2876097, 37.8022963)) + def test_iter_objects_geometry_20180312(self): with httmock.HTTMock(respond_locally): @@ -32,10 +48,10 @@ def test_iter_objects_geometry_20180312(self): self.assertEqual(g3.lonlats[0:2], [-122.28428740000001, 37.827691900000005]) self.assertEqual(len(g3.lonlats), 16) - def test_iter_objects_intersection(self): + def test_iter_objects_intersection_20180307(self): with httmock.HTTMock(respond_locally): - intersections = tile.iter_objects('http://example.com/intersection.pbf', + intersections = tile.iter_objects('http://example.com/intersection-20180307.pbf', tile.data_classes['intersection']) i1, i2, i3 = list(intersections) @@ -48,7 +64,7 @@ def test_iter_objects_intersection(self): self.assertEqual(i3.id, '80e533ecdcc667e37c9473c4b6fdb03d') self.assertEqual((i3.lon, i3.lat), (-122.28473890000001, 37.840128500000006)) - def test_iter_objects_geometry(self): + def test_iter_objects_geometry_20180307(self): with httmock.HTTMock(respond_locally): geometries = tile.iter_objects('http://example.com/geometry-20180307.pbf', From 70d7cbbad8614d06134b59f5f8546bbc4a9a1159 Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 21:18:04 -0700 Subject: [PATCH 06/10] Added new reference PBF sample --- .../{reference.pbf => reference-20180307.pbf} | 0 .../tests/data/reference-20180312.pbf | 10 +++++++ sharedstreets/tests/test_tile.py | 29 +++++++++++++++++-- 3 files changed, 37 insertions(+), 2 deletions(-) rename sharedstreets/tests/data/{reference.pbf => reference-20180307.pbf} (100%) create mode 100644 sharedstreets/tests/data/reference-20180312.pbf diff --git a/sharedstreets/tests/data/reference.pbf b/sharedstreets/tests/data/reference-20180307.pbf similarity index 100% rename from sharedstreets/tests/data/reference.pbf rename to sharedstreets/tests/data/reference-20180307.pbf diff --git a/sharedstreets/tests/data/reference-20180312.pbf b/sharedstreets/tests/data/reference-20180312.pbf new file mode 100644 index 0000000..fba3487 --- /dev/null +++ b/sharedstreets/tests/data/reference-20180312.pbf @@ -0,0 +1,10 @@ + + 0da8eb83f863b1c7484e3705230e4632 4c6740bae7b8ed7fc15b4f79ade6af82"9 + 8b60a7a14db65f50b3138cdd1a29c3b8~5N^4B@(O0N"6 + 8739b929eae329e18ec631c8363206deՍ^&B@ _ + f61c335244e8222f9c31b6eb14fea48a 1f624570a89b260bc88e97509be49c96"9 + d4715dff9b7de5b5dcd107d127f9ffd2?4^$tB@( 0F"6 + 988b0c91439ae6663ddc2b0d4808185c%+^00!B@  + c99662b7d646b3f930abc1cbf3e7290c 1f624570a89b260bc88e97509be49c96": + 988b0c91439ae6663ddc2b0d4808185c%+^00!B@(0F"7 + d4715dff9b7de5b5dcd107d127f9ffd2?4^$tB@  \ No newline at end of file diff --git a/sharedstreets/tests/test_tile.py b/sharedstreets/tests/test_tile.py index c452c50..d9125f5 100644 --- a/sharedstreets/tests/test_tile.py +++ b/sharedstreets/tests/test_tile.py @@ -48,6 +48,31 @@ def test_iter_objects_geometry_20180312(self): self.assertEqual(g3.lonlats[0:2], [-122.28428740000001, 37.827691900000005]) self.assertEqual(len(g3.lonlats), 16) + def test_iter_objects_reference_20180312(self): + + with httmock.HTTMock(respond_locally): + references = tile.iter_objects('http://example.com/reference-20180312.pbf', + tile.data_classes['reference']) + r1, r2, r3 = list(references) + + self.assertEqual(r1.id, '0da8eb83f863b1c7484e3705230e4632') + self.assertEqual(r1.geometryId, '4c6740bae7b8ed7fc15b4f79ade6af82') + self.assertEqual(len(r1.locationReferences), 2) + self.assertEqual(r1.locationReferences[0].intersectionId, '8b60a7a14db65f50b3138cdd1a29c3b8') + self.assertEqual(r1.locationReferences[1].intersectionId, '8739b929eae329e18ec631c8363206de') + + self.assertEqual(r2.id, 'f61c335244e8222f9c31b6eb14fea48a') + self.assertEqual(r2.geometryId, '1f624570a89b260bc88e97509be49c96') + self.assertEqual(len(r2.locationReferences), 2) + self.assertEqual(r2.locationReferences[0].intersectionId, 'd4715dff9b7de5b5dcd107d127f9ffd2') + self.assertEqual(r2.locationReferences[1].intersectionId, '988b0c91439ae6663ddc2b0d4808185c') + + self.assertEqual(r3.id, 'c99662b7d646b3f930abc1cbf3e7290c') + self.assertEqual(r3.geometryId, '1f624570a89b260bc88e97509be49c96') + self.assertEqual(len(r3.locationReferences), 2) + self.assertEqual(r3.locationReferences[0].intersectionId, '988b0c91439ae6663ddc2b0d4808185c') + self.assertEqual(r3.locationReferences[1].intersectionId, 'd4715dff9b7de5b5dcd107d127f9ffd2') + def test_iter_objects_intersection_20180307(self): with httmock.HTTMock(respond_locally): @@ -83,10 +108,10 @@ def test_iter_objects_geometry_20180307(self): self.assertEqual(g3.lonlats[0:2], [-122.25996420000001, 37.853876400000004]) self.assertEqual(len(g3.lonlats), 6) - def test_iter_objects_reference(self): + def test_iter_objects_reference_20180307(self): with httmock.HTTMock(respond_locally): - references = tile.iter_objects('http://example.com/reference.pbf', + references = tile.iter_objects('http://example.com/reference-20180307.pbf', tile.data_classes['reference']) r1, r2, r3 = list(references) From 6bd07707ab911beb873117343e6fc9a15911712c Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 21:22:15 -0700 Subject: [PATCH 07/10] Added new metadata PBF sample --- .../{metadata.pbf => metadata-20180307.pbf} | 0 .../tests/data/metadata-20180312.pbf | 8 ++++++ sharedstreets/tests/test_tile.py | 26 +++++++++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) rename sharedstreets/tests/data/{metadata.pbf => metadata-20180307.pbf} (100%) create mode 100644 sharedstreets/tests/data/metadata-20180312.pbf diff --git a/sharedstreets/tests/data/metadata.pbf b/sharedstreets/tests/data/metadata-20180307.pbf similarity index 100% rename from sharedstreets/tests/data/metadata.pbf rename to sharedstreets/tests/data/metadata-20180307.pbf diff --git a/sharedstreets/tests/data/metadata-20180312.pbf b/sharedstreets/tests/data/metadata-20180312.pbf new file mode 100644 index 0000000..0ac1e3e --- /dev/null +++ b/sharedstreets/tests/data/metadata-20180312.pbf @@ -0,0 +1,8 @@ +W + 80832506185371acf24df519ce271d313 + 2ااCarleton Street: + 80a8a7c120332bfb679f877472c9c18d +ס2 +r + 82b5776e9fcce1c64a431a14bd59b15dN +2ᦩ2'ۧ/ӲԲ篶West MacArthur Boulevard \ No newline at end of file diff --git a/sharedstreets/tests/test_tile.py b/sharedstreets/tests/test_tile.py index d9125f5..14bde6e 100644 --- a/sharedstreets/tests/test_tile.py +++ b/sharedstreets/tests/test_tile.py @@ -73,6 +73,28 @@ def test_iter_objects_reference_20180312(self): self.assertEqual(r3.locationReferences[0].intersectionId, '988b0c91439ae6663ddc2b0d4808185c') self.assertEqual(r3.locationReferences[1].intersectionId, 'd4715dff9b7de5b5dcd107d127f9ffd2') + def test_iter_objects_metadata_20180312(self): + + with httmock.HTTMock(respond_locally): + metadata = tile.iter_objects('http://example.com/metadata-20180312.pbf', + tile.data_classes['metadata']) + m1, m2, m3 = list(metadata) + + self.assertEqual(m1.geometryId, '80832506185371acf24df519ce271d31') + self.assertEqual(len(m1.osmMetadata.waySections), 1) + self.assertEqual(m1.osmMetadata.waySections[0].wayId, 6346743) + self.assertEqual(m1.osmMetadata.name, 'Carleton Street') + + self.assertEqual(m2.geometryId, '80a8a7c120332bfb679f877472c9c18d') + self.assertEqual(len(m2.osmMetadata.waySections), 1) + self.assertEqual(m2.osmMetadata.waySections[0].wayId, 405302258) + self.assertEqual(m2.osmMetadata.name, '') + + self.assertEqual(m3.geometryId, '82b5776e9fcce1c64a431a14bd59b15d') + self.assertEqual(len(m3.osmMetadata.waySections), 1) + self.assertEqual(m3.osmMetadata.waySections[0].wayId, 11162465) + self.assertEqual(m3.osmMetadata.name, 'West MacArthur Boulevard') + def test_iter_objects_intersection_20180307(self): with httmock.HTTMock(respond_locally): @@ -133,10 +155,10 @@ def test_iter_objects_reference_20180307(self): self.assertEqual(r3.locationReferences[0].intersectionId, '38d5bb092bc572bd305a7812f0c8c0bf') self.assertEqual(r3.locationReferences[1].intersectionId, '0ad982f6c3e46b256115742f49da8da5') - def test_iter_objects_metadata(self): + def test_iter_objects_metadata_20180307(self): with httmock.HTTMock(respond_locally): - metadata = tile.iter_objects('http://example.com/metadata.pbf', + metadata = tile.iter_objects('http://example.com/metadata-20180307.pbf', tile.data_classes['metadata']) m1, m2, m3 = list(metadata) From 12094b601248ddc4a059db058f0547163a3726f8 Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 21:25:16 -0700 Subject: [PATCH 08/10] Reversed sample data names to sort well --- ...try-20180307.pbf => 20180307-geometry.pbf} | 0 ...20180307.pbf => 20180307-intersection.pbf} | 0 ...ata-20180307.pbf => 20180307-metadata.pbf} | 0 ...ce-20180307.pbf => 20180307-reference.pbf} | 0 ...try-20180312.pbf => 20180312-geometry.pbf} | 0 ...20180312.pbf => 20180312-intersection.pbf} | 0 ...ata-20180312.pbf => 20180312-metadata.pbf} | 0 ...ce-20180312.pbf => 20180312-reference.pbf} | 0 sharedstreets/tests/test_tile.py | 34 +++++++++---------- 9 files changed, 17 insertions(+), 17 deletions(-) rename sharedstreets/tests/data/{geometry-20180307.pbf => 20180307-geometry.pbf} (100%) rename sharedstreets/tests/data/{intersection-20180307.pbf => 20180307-intersection.pbf} (100%) rename sharedstreets/tests/data/{metadata-20180307.pbf => 20180307-metadata.pbf} (100%) rename sharedstreets/tests/data/{reference-20180307.pbf => 20180307-reference.pbf} (100%) rename sharedstreets/tests/data/{geometry-20180312.pbf => 20180312-geometry.pbf} (100%) rename sharedstreets/tests/data/{intersection-20180312.pbf => 20180312-intersection.pbf} (100%) rename sharedstreets/tests/data/{metadata-20180312.pbf => 20180312-metadata.pbf} (100%) rename sharedstreets/tests/data/{reference-20180312.pbf => 20180312-reference.pbf} (100%) diff --git a/sharedstreets/tests/data/geometry-20180307.pbf b/sharedstreets/tests/data/20180307-geometry.pbf similarity index 100% rename from sharedstreets/tests/data/geometry-20180307.pbf rename to sharedstreets/tests/data/20180307-geometry.pbf diff --git a/sharedstreets/tests/data/intersection-20180307.pbf b/sharedstreets/tests/data/20180307-intersection.pbf similarity index 100% rename from sharedstreets/tests/data/intersection-20180307.pbf rename to sharedstreets/tests/data/20180307-intersection.pbf diff --git a/sharedstreets/tests/data/metadata-20180307.pbf b/sharedstreets/tests/data/20180307-metadata.pbf similarity index 100% rename from sharedstreets/tests/data/metadata-20180307.pbf rename to sharedstreets/tests/data/20180307-metadata.pbf diff --git a/sharedstreets/tests/data/reference-20180307.pbf b/sharedstreets/tests/data/20180307-reference.pbf similarity index 100% rename from sharedstreets/tests/data/reference-20180307.pbf rename to sharedstreets/tests/data/20180307-reference.pbf diff --git a/sharedstreets/tests/data/geometry-20180312.pbf b/sharedstreets/tests/data/20180312-geometry.pbf similarity index 100% rename from sharedstreets/tests/data/geometry-20180312.pbf rename to sharedstreets/tests/data/20180312-geometry.pbf diff --git a/sharedstreets/tests/data/intersection-20180312.pbf b/sharedstreets/tests/data/20180312-intersection.pbf similarity index 100% rename from sharedstreets/tests/data/intersection-20180312.pbf rename to sharedstreets/tests/data/20180312-intersection.pbf diff --git a/sharedstreets/tests/data/metadata-20180312.pbf b/sharedstreets/tests/data/20180312-metadata.pbf similarity index 100% rename from sharedstreets/tests/data/metadata-20180312.pbf rename to sharedstreets/tests/data/20180312-metadata.pbf diff --git a/sharedstreets/tests/data/reference-20180312.pbf b/sharedstreets/tests/data/20180312-reference.pbf similarity index 100% rename from sharedstreets/tests/data/reference-20180312.pbf rename to sharedstreets/tests/data/20180312-reference.pbf diff --git a/sharedstreets/tests/test_tile.py b/sharedstreets/tests/test_tile.py index 14bde6e..47cc5e3 100644 --- a/sharedstreets/tests/test_tile.py +++ b/sharedstreets/tests/test_tile.py @@ -13,10 +13,10 @@ def respond_locally(url, request): class TestTile (unittest.TestCase): - def test_iter_objects_intersection_20180312(self): + def test_iter_objects_20180312_intersection(self): with httmock.HTTMock(respond_locally): - intersections = tile.iter_objects('http://example.com/intersection-20180312.pbf', + intersections = tile.iter_objects('http://example.com/20180312-intersection.pbf', tile.data_classes['intersection']) i1, i2, i3 = list(intersections) @@ -29,10 +29,10 @@ def test_iter_objects_intersection_20180312(self): self.assertEqual(i3.id, '81966cd8b3352f5b819009bffb0ff6c1') self.assertEqual((i3.lon, i3.lat), (-122.2876097, 37.8022963)) - def test_iter_objects_geometry_20180312(self): + def test_iter_objects_20180312_geometry(self): with httmock.HTTMock(respond_locally): - geometries = tile.iter_objects('http://example.com/geometry-20180312.pbf', + geometries = tile.iter_objects('http://example.com/20180312-geometry.pbf', tile.data_classes['geometry']) g1, g2, g3 = list(geometries) @@ -48,10 +48,10 @@ def test_iter_objects_geometry_20180312(self): self.assertEqual(g3.lonlats[0:2], [-122.28428740000001, 37.827691900000005]) self.assertEqual(len(g3.lonlats), 16) - def test_iter_objects_reference_20180312(self): + def test_iter_objects_20180312_reference(self): with httmock.HTTMock(respond_locally): - references = tile.iter_objects('http://example.com/reference-20180312.pbf', + references = tile.iter_objects('http://example.com/20180312-reference.pbf', tile.data_classes['reference']) r1, r2, r3 = list(references) @@ -73,10 +73,10 @@ def test_iter_objects_reference_20180312(self): self.assertEqual(r3.locationReferences[0].intersectionId, '988b0c91439ae6663ddc2b0d4808185c') self.assertEqual(r3.locationReferences[1].intersectionId, 'd4715dff9b7de5b5dcd107d127f9ffd2') - def test_iter_objects_metadata_20180312(self): + def test_iter_objects_20180312_metadata(self): with httmock.HTTMock(respond_locally): - metadata = tile.iter_objects('http://example.com/metadata-20180312.pbf', + metadata = tile.iter_objects('http://example.com/20180312-metadata.pbf', tile.data_classes['metadata']) m1, m2, m3 = list(metadata) @@ -95,10 +95,10 @@ def test_iter_objects_metadata_20180312(self): self.assertEqual(m3.osmMetadata.waySections[0].wayId, 11162465) self.assertEqual(m3.osmMetadata.name, 'West MacArthur Boulevard') - def test_iter_objects_intersection_20180307(self): + def test_iter_objects_20180307_intersection(self): with httmock.HTTMock(respond_locally): - intersections = tile.iter_objects('http://example.com/intersection-20180307.pbf', + intersections = tile.iter_objects('http://example.com/20180307-intersection.pbf', tile.data_classes['intersection']) i1, i2, i3 = list(intersections) @@ -111,10 +111,10 @@ def test_iter_objects_intersection_20180307(self): self.assertEqual(i3.id, '80e533ecdcc667e37c9473c4b6fdb03d') self.assertEqual((i3.lon, i3.lat), (-122.28473890000001, 37.840128500000006)) - def test_iter_objects_geometry_20180307(self): + def test_iter_objects_20180307_geometry(self): with httmock.HTTMock(respond_locally): - geometries = tile.iter_objects('http://example.com/geometry-20180307.pbf', + geometries = tile.iter_objects('http://example.com/20180307-geometry.pbf', tile.data_classes['geometry']) g1, g2, g3 = list(geometries) @@ -130,10 +130,10 @@ def test_iter_objects_geometry_20180307(self): self.assertEqual(g3.lonlats[0:2], [-122.25996420000001, 37.853876400000004]) self.assertEqual(len(g3.lonlats), 6) - def test_iter_objects_reference_20180307(self): + def test_iter_objects_20180307_reference(self): with httmock.HTTMock(respond_locally): - references = tile.iter_objects('http://example.com/reference-20180307.pbf', + references = tile.iter_objects('http://example.com/20180307-reference.pbf', tile.data_classes['reference']) r1, r2, r3 = list(references) @@ -155,10 +155,10 @@ def test_iter_objects_reference_20180307(self): self.assertEqual(r3.locationReferences[0].intersectionId, '38d5bb092bc572bd305a7812f0c8c0bf') self.assertEqual(r3.locationReferences[1].intersectionId, '0ad982f6c3e46b256115742f49da8da5') - def test_iter_objects_metadata_20180307(self): + def test_iter_objects_20180307_metadata(self): with httmock.HTTMock(respond_locally): - metadata = tile.iter_objects('http://example.com/metadata-20180307.pbf', + metadata = tile.iter_objects('http://example.com/20180307-metadata.pbf', tile.data_classes['metadata']) m1, m2, m3 = list(metadata) @@ -177,7 +177,7 @@ def test_iter_objects_metadata_20180307(self): def test_is_inside(self): with httmock.HTTMock(respond_locally): - geometries = tile.iter_objects('http://example.com/geometry-20180307.pbf', + geometries = tile.iter_objects('http://example.com/20180307-geometry.pbf', tile.data_classes['geometry']) # 11th Street between Castro & MLK From 9614e7e13145b732f894241aed5eaf846bb792fc Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Mon, 19 Mar 2018 21:32:52 -0700 Subject: [PATCH 09/10] Added protobuf compilation hints to README --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f54b85e..8d6227e 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,15 @@ Python implementation of [SharedStreets Reference System](https://github.com/sha gunicorn sharedstreets.webapp:app -## API +## Protobufs + +Current `.proto` files can can be found at +[sharedstreets/sharedstreets-ref-system](https://github.com/sharedstreets/sharedstreets-ref-system/tree/master/proto). + +[Install `protoc`](https://github.com/google/protobuf) and +[follow Python directions](https://developers.google.com/protocol-buffers/docs/reference/python-generated#invocation) +to regenerate `sharedstreets/sharedstreets_pb2.py` if necessary: + + protoc --proto_path=sharedstreets-ref-system/proto \ + --python_out=sharedstreets-python/sharedstreets \ + sharedstreets-ref-system/proto/sharedstreets.proto \ No newline at end of file From 82940772c991578f4fe4080cc99002f502ea6f13 Mon Sep 17 00:00:00 2001 From: Michal Migurski Date: Sun, 15 Apr 2018 11:38:30 -0700 Subject: [PATCH 10/10] Updated upstream tile path --- sharedstreets/tile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharedstreets/tile.py b/sharedstreets/tile.py index 069c104..a11cba9 100644 --- a/sharedstreets/tile.py +++ b/sharedstreets/tile.py @@ -6,7 +6,7 @@ logger = logging.getLogger(__name__) # https://github.com/sharedstreets/sharedstreets-ref-system/issues/16 -data_url_template, data_zoom = 'https://tiles.sharedstreets.io/planet-180312/{z}-{x}-{y}.{layer}.pbf', 12 +data_url_template, data_zoom = 'https://tiles.sharedstreets.io/osm/planet-180312/{z}-{x}-{y}.{layer}.6.pbf', 12 data_classes = { 'reference': sharedstreets_pb2.SharedStreetsReference, 'intersection': sharedstreets_pb2.SharedStreetsIntersection,