Skip to content

Commit

Permalink
Import (small parts of) Hong Kong, Tokyo, and Seoul
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Nov 28, 2023
1 parent 817e220 commit 888643c
Show file tree
Hide file tree
Showing 11 changed files with 195 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 7 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions data/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions data/system/assets/flags/hk.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions data/system/assets/flags/kr.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/system/extra_fonts/NotoSansKR-Regular.ttf
Binary file not shown.
48 changes: 48 additions & 0 deletions importer/config/hk/kowloon/tsim_sha_tsui.geojson
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
36 changes: 36 additions & 0 deletions importer/config/jp/tokyo/shibuya.geojson
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
36 changes: 36 additions & 0 deletions importer/config/kr/seoul/itaewon_dong.geojson
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
4 changes: 2 additions & 2 deletions map_gui/src/load.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
11 changes: 11 additions & 0 deletions map_gui/src/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()) {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 888643c

Please sign in to comment.