Import (small parts of) Hong Kong, Tokyo, and Seoul

This commit is contained in:
Dustin Carlino 2023-11-28 12:09:03 +00:00
parent 817e2203fe
commit 888643ccff
11 changed files with 195 additions and 8 deletions

3
.gitignore vendored
View File

@ -97,12 +97,15 @@ data/system/gb/wichelstowe
data/system/gb/wixams
data/system/gb/wokingham
data/system/gb/wynyard
data/system/hk/kowloon
data/system/il/tel_aviv
data/system/in/pune
data/system/ir/tehran
data/system/ly/tripoli
data/system/nz/auckland
data/system/jp/hiroshima
data/system/jp/tokyo
data/system/kr/seoul
data/system/pl/krakow
data/system/pl/warsaw
data/system/pt/lisbon

13
Cargo.lock generated
View File

@ -1919,7 +1919,7 @@ dependencies = [
[[package]]
name = "geom"
version = "0.1.0"
source = "git+https://github.com/a-b-street/geom#97d271a536fc5877e778189512b2f65212b8c8ed"
source = "git+https://github.com/a-b-street/geom#9bb49fce2be2c527405a821ffd22c63869416976"
dependencies = [
"anyhow",
"earcutr",
@ -3390,7 +3390,7 @@ checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee"
[[package]]
name = "osm2lanes"
version = "0.1.0"
source = "git+https://github.com/a-b-street/osm2streets#ee4d022879169687ca8d97a9553f1c17251324f8"
source = "git+https://github.com/a-b-street/osm2streets#bb4d1cdafd2138b1b50698ac64798cda01115e3b"
dependencies = [
"abstutil",
"anyhow",
@ -3402,7 +3402,7 @@ dependencies = [
[[package]]
name = "osm2streets"
version = "0.1.0"
source = "git+https://github.com/a-b-street/osm2streets#ee4d022879169687ca8d97a9553f1c17251324f8"
source = "git+https://github.com/a-b-street/osm2streets#bb4d1cdafd2138b1b50698ac64798cda01115e3b"
dependencies = [
"abstutil",
"anyhow",
@ -3637,8 +3637,9 @@ dependencies = [
[[package]]
name = "polylabel"
version = "3.0.0"
source = "git+https://github.com/dabreegster/polylabel-rs?branch=update_geo#f01b75acbc5ef9c8b1f61af8f74e3403c1ee9d0b"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93b10c25671a60bbd95b230005a8fa1964d34ee4dbcd7306c36fac979b660fab"
dependencies = [
"geo",
"num-traits",
@ -4606,7 +4607,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "streets_reader"
version = "0.1.0"
source = "git+https://github.com/a-b-street/osm2streets#ee4d022879169687ca8d97a9553f1c17251324f8"
source = "git+https://github.com/a-b-street/osm2streets#bb4d1cdafd2138b1b50698ac64798cda01115e3b"
dependencies = [
"abstutil",
"anyhow",

View File

@ -935,6 +935,11 @@
"uncompressed_size_bytes": 14290313,
"compressed_size_bytes": 4214415
},
"data/input/hk/kowloon/raw_maps/tsim_sha_tsui.bin": {
"checksum": "778bfaaf350430767948e122c175e7af",
"uncompressed_size_bytes": 6977891,
"compressed_size_bytes": 1505560
},
"data/input/il/tel_aviv/raw_maps/center.bin": {
"checksum": "0fc91bd403e2365979ddd15ab9435fe6",
"uncompressed_size_bytes": 14161044,
@ -1000,6 +1005,16 @@
"uncompressed_size_bytes": 474959,
"compressed_size_bytes": 149015
},
"data/input/jp/tokyo/raw_maps/shibuya.bin": {
"checksum": "2907137155eab7d879c6b272c822374f",
"uncompressed_size_bytes": 8929612,
"compressed_size_bytes": 2370982
},
"data/input/kr/seoul/raw_maps/itaewon_dong.bin": {
"checksum": "4a94e70dbcfd256bea89d2b55c4f9ecc",
"uncompressed_size_bytes": 4175249,
"compressed_size_bytes": 1153822
},
"data/input/ly/tripoli/raw_maps/center.bin": {
"checksum": "b80ee6dbfb41d2ce756026d1d827b055",
"uncompressed_size_bytes": 7813342,
@ -1075,6 +1090,11 @@
"uncompressed_size_bytes": 54217485,
"compressed_size_bytes": 54057897
},
"data/input/shared/geofabrik/asia/china-latest.osm.pbf": {
"checksum": "83cfb5719ae73a7031c258d39fc5b191",
"uncompressed_size_bytes": 1081785095,
"compressed_size_bytes": 1080480391
},
"data/input/shared/geofabrik/asia/india-latest.osm.pbf": {
"checksum": "2bda0ae30306f73510846dff089b5edd",
"uncompressed_size_bytes": 1314526047,
@ -1095,11 +1115,21 @@
"uncompressed_size_bytes": 159384670,
"compressed_size_bytes": 159153169
},
"data/input/shared/geofabrik/asia/japan/kanto-latest.osm.pbf": {
"checksum": "2b9c360f0f88f3299eda193995e8fc10",
"uncompressed_size_bytes": 379779692,
"compressed_size_bytes": 379226079
},
"data/input/shared/geofabrik/asia/malaysia-singapore-brunei-latest.osm.pbf": {
"checksum": "f7bc92125a62fb908c917b2f65ac3ff1",
"uncompressed_size_bytes": 198960533,
"compressed_size_bytes": 198716613
},
"data/input/shared/geofabrik/asia/south-korea-latest.osm.pbf": {
"checksum": "8ed10217d1c486e1c94198ad0dc64f43",
"uncompressed_size_bytes": 197399811,
"compressed_size_bytes": 197213123
},
"data/input/shared/geofabrik/asia/taiwan-latest.osm.pbf": {
"checksum": "59c9e9c99006b3434259cb64d76fbb70",
"uncompressed_size_bytes": 114907029,
@ -1960,6 +1990,11 @@
"uncompressed_size_bytes": 42704,
"compressed_size_bytes": 24130
},
"data/system/extra_fonts/NotoSansKR-Regular.ttf": {
"checksum": "e910afbd441c5247227fb4a731d65799",
"uncompressed_size_bytes": 6192764,
"compressed_size_bytes": 3003864
},
"data/system/extra_fonts/NotoSerifCJKtc-Regular.otf": {
"checksum": "338584d1454293b6dfd84a9137153b3c",
"uncompressed_size_bytes": 23614420,
@ -3905,6 +3940,11 @@
"uncompressed_size_bytes": 7181152,
"compressed_size_bytes": 1775644
},
"data/system/hk/kowloon/maps/tsim_sha_tsui.bin": {
"checksum": "51ee01d6f6327f706556da4eb7d096c7",
"uncompressed_size_bytes": 11367848,
"compressed_size_bytes": 3628467
},
"data/system/il/tel_aviv/maps/center.bin": {
"checksum": "d2ef8968a81cee19cd786d9f3942a6c9",
"uncompressed_size_bytes": 49042121,
@ -3975,6 +4015,16 @@
"uncompressed_size_bytes": 1672245,
"compressed_size_bytes": 636628
},
"data/system/jp/tokyo/maps/shibuya.bin": {
"checksum": "209546f662e2318d3045cabe6e011adb",
"uncompressed_size_bytes": 21351607,
"compressed_size_bytes": 8128210
},
"data/system/kr/seoul/maps/itaewon_dong.bin": {
"checksum": "5916da8ea3ccb10fed8d62ab62a8b2e8",
"uncompressed_size_bytes": 17321534,
"compressed_size_bytes": 6792700
},
"data/system/ly/tripoli/maps/center.bin": {
"checksum": "0e50a58f25e9ed4617d15b461ed76452",
"uncompressed_size_bytes": 30753643,

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 900 600"><path fill="#EE1C25" d="M0 0h900v600H0z"/><g id="a"><path d="M449.964 299.913c-105.263-44.486-58.602-181.581 42.07-174.69-20.366 10.467-23.318 29.997-11.687 48.09 13.024 20.256-1.2 52.848-18.806 60.767-28.935 13.025-34.728 47.75-11.577 65.833z" fill="#fff"/><path d="M444.272 200.92l-5.92 9.294-2.144-10.815-10.679-2.759 9.625-5.39-.671-10.999 8.085 7.49 10.256-4.043-4.61 10.01 7.001 8.505zm6.288 97.839c-12.731-6.534-22.996-20.155-27.468-36.431-5.115-18.67-2.173-38.743 8.083-55.038l-2.208-1.394c-10.64 16.929-13.693 37.743-8.386 57.12 4.728 17.221 15.214 31.097 28.787 38.064z" fill="#EE1C25"/></g><use xlink:href="#a" transform="rotate(72 450 300)"/><use xlink:href="#a" transform="rotate(144 450 300)"/><use xlink:href="#a" transform="rotate(216 450 300)"/><use xlink:href="#a" transform="rotate(288 450 300)"/></svg>

After

Width:  |  Height:  |  Size: 927 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-36 -24 72 48"><path fill="#fff" d="M-36-24h72v48h-72z"/><g transform="rotate(-56.31)"><g id="b"><path id="a" d="M-6-25H6m-12 3H6m-12 3H6" stroke="#000" stroke-width="2"/><use xlink:href="#a" y="44"/></g><path stroke="#fff" d="M0 17v10"/><circle fill="#cd2e3a" r="12"/><path fill="#0047a0" d="M0-12A6 6 0 000 0a6 6 0 010 12 12 12 0 010-24z"/></g><g transform="rotate(-123.69)"><use xlink:href="#b"/><path stroke="#fff" d="M0-23.5v3M0 17v3.5m0 3v3"/></g></svg>

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

View File

@ -0,0 +1,48 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[
114.16160386797134,
22.315792440162127
],
[
114.16171962226144,
22.301710067644223
],
[
114.1676809682923,
22.301870711078493
],
[
114.16924365123191,
22.29448092189031
],
[
114.17821460884744,
22.297801020460227
],
[
114.19013730090478,
22.302352640274847
],
[
114.19152635240715,
22.3148822156721
],
[
114.16160386797134,
22.315792440162127
]
]
],
"type": "Polygon"
}
}
]
}

View File

@ -0,0 +1,36 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[
139.68037337025942,
35.66696129802982
],
[
139.68037337025942,
35.64551935993049
],
[
139.72764182456154,
35.64551935993049
],
[
139.72764182456154,
35.66696129802982
],
[
139.68037337025942,
35.66696129802982
]
]
],
"type": "Polygon"
}
}
]
}

View File

@ -0,0 +1,36 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[
[
126.96255019339702,
37.5504166249313
],
[
126.96255019339702,
37.521140208573286
],
[
127.01019531611081,
37.521140208573286
],
[
127.01019531611081,
37.5504166249313
],
[
126.96255019339702,
37.5504166249313
]
]
],
"type": "Polygon"
}
}
]
}

View File

@ -31,10 +31,10 @@ impl MapLoader {
) -> Box<dyn State<A>> {
// TODO Generalize this more, maybe with some kind of country code -> font config
if let Some(extra_font) = match name.city.country.as_ref() {
"hk" | "jp" | "tw" => Some("NotoSerifCJKtc-Regular.otf"),
"il" => Some("NotoSansHebrew-Regular.ttf"),
"ir" | "ly" => Some("NotoSansArabic-Regular.ttf"),
"jp" => Some("NotoSerifCJKtc-Regular.otf"),
"tw" => Some("NotoSerifCJKtc-Regular.otf"),
"kr" => Some("NotoSansKR-Regular.ttf"),
_ => None,
} {
if !ctx.is_font_loaded(extra_font) {

View File

@ -245,6 +245,10 @@ pub fn nice_map_name(name: &MapName) -> &str {
("wynyard", "center") => "Wynyard",
_ => &name.map,
},
"hk" => match (name.city.city.as_ref(), name.map.as_ref()) {
("kowloon", "tsim_sha_tsui") => "Tsim Sha Tsui",
_ => &name.map,
},
"il" => match (name.city.city.as_ref(), name.map.as_ref()) {
("tel_aviv", "center") => "Tel Aviv (city center)",
_ => &name.map,
@ -259,6 +263,11 @@ pub fn nice_map_name(name: &MapName) -> &str {
},
"jp" => match (name.city.city.as_ref(), name.map.as_ref()) {
("hiroshima", "uni") => "Hiroshima University",
("tokyo", "shibuya") => "Shibuya",
_ => &name.map,
},
"kr" => match (name.city.city.as_ref(), name.map.as_ref()) {
("seoul", "itaewon_dong") => "Itaewon Dong",
_ => &name.map,
},
"ly" => match (name.city.city.as_ref(), name.map.as_ref()) {
@ -350,7 +359,9 @@ pub fn nice_country_name(code: &str) -> &str {
"il" => "Israel",
"in" => "India",
"ir" => "Iran",
"hk" => "Hong Kong",
"jp" => "Japan",
"kr" => "South Korea",
"ly" => "Libya",
"nl" => "Netherlands",
"nz" => "New Zealand",