diff --git a/media/attribution.js b/media/attribution.js index 0b519980..bb205b8b 100644 --- a/media/attribution.js +++ b/media/attribution.js @@ -15396,6 +15396,13 @@ const attributionData = { "naturalearth" ] }, + { + prefix: "./media/naturals/rivers", + all: "https://www.naturalearthdata.com/downloads/10m-physical-vectors/", + authors: [ + "naturalearth" + ] + }, { prefix: "./media/food/plants/", files: [ diff --git a/media/naturals/rivers/Alabama.svg b/media/naturals/rivers/Alabama.svg new file mode 100644 index 00000000..57b84720 --- /dev/null +++ b/media/naturals/rivers/Alabama.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Amazon.svg b/media/naturals/rivers/Amazon.svg new file mode 100644 index 00000000..588a922e --- /dev/null +++ b/media/naturals/rivers/Amazon.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Brazos.svg b/media/naturals/rivers/Brazos.svg new file mode 100644 index 00000000..33ac83ab --- /dev/null +++ b/media/naturals/rivers/Brazos.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Danube.svg b/media/naturals/rivers/Danube.svg new file mode 100644 index 00000000..b94cbf6f --- /dev/null +++ b/media/naturals/rivers/Danube.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Ganges.svg b/media/naturals/rivers/Ganges.svg new file mode 100644 index 00000000..2cec7e2e --- /dev/null +++ b/media/naturals/rivers/Ganges.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Indus.svg b/media/naturals/rivers/Indus.svg new file mode 100644 index 00000000..5f1d0439 --- /dev/null +++ b/media/naturals/rivers/Indus.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Mississippi.svg b/media/naturals/rivers/Mississippi.svg new file mode 100644 index 00000000..ee3668aa --- /dev/null +++ b/media/naturals/rivers/Mississippi.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Missouri.svg b/media/naturals/rivers/Missouri.svg new file mode 100644 index 00000000..962eb819 --- /dev/null +++ b/media/naturals/rivers/Missouri.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Niger.svg b/media/naturals/rivers/Niger.svg new file mode 100644 index 00000000..49761791 --- /dev/null +++ b/media/naturals/rivers/Niger.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Nile.svg b/media/naturals/rivers/Nile.svg new file mode 100644 index 00000000..4114bfcf --- /dev/null +++ b/media/naturals/rivers/Nile.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Ohio.svg b/media/naturals/rivers/Ohio.svg new file mode 100644 index 00000000..9ad03eae --- /dev/null +++ b/media/naturals/rivers/Ohio.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Rhine.svg b/media/naturals/rivers/Rhine.svg new file mode 100644 index 00000000..c546d03e --- /dev/null +++ b/media/naturals/rivers/Rhine.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Rio Grande.svg b/media/naturals/rivers/Rio Grande.svg new file mode 100644 index 00000000..579bc92d --- /dev/null +++ b/media/naturals/rivers/Rio Grande.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Seine.svg b/media/naturals/rivers/Seine.svg new file mode 100644 index 00000000..1f4fc42c --- /dev/null +++ b/media/naturals/rivers/Seine.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Thames.svg b/media/naturals/rivers/Thames.svg new file mode 100644 index 00000000..ddffdb3b --- /dev/null +++ b/media/naturals/rivers/Thames.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Tiber.svg b/media/naturals/rivers/Tiber.svg new file mode 100644 index 00000000..8dbc837d --- /dev/null +++ b/media/naturals/rivers/Tiber.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Volga.svg b/media/naturals/rivers/Volga.svg new file mode 100644 index 00000000..e78c3152 --- /dev/null +++ b/media/naturals/rivers/Volga.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Yangtze.svg b/media/naturals/rivers/Yangtze.svg new file mode 100644 index 00000000..4004b01e --- /dev/null +++ b/media/naturals/rivers/Yangtze.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/media/naturals/rivers/Yellow.svg b/media/naturals/rivers/Yellow.svg new file mode 100644 index 00000000..baf3dc68 --- /dev/null +++ b/media/naturals/rivers/Yellow.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/presets/naturals.js b/presets/naturals.js index 6dbf7104..8430c616 100644 --- a/presets/naturals.js +++ b/presets/naturals.js @@ -896,6 +896,8 @@ const globalCityData = [ const straitData = [["Strait of Dover", 31174983454.928658, 222577.01735751258], ["Strait of Gibraltar", 4012438156.156927, 55658.19643643095], ["Strait of Hormuz", 25574748008.534893, 122431.35146918982], ["Strait of Messina", 97316549.67370307, 11131.941670965367], ["Strait of Otranto", 30353100830.64735, 189202.32829987607], ["Strait of Juan de Fuca", 36469939347.95791, 178049.49203886717], ["Bering Strait", 49612154086.2841, 211274.1384794921], ["Bass Strait", 278145181872.9597, 477687.07599560975], ["Palk Strait", 36632925592.65483, 166948.86982564948], ["Hudson Strait", 235671965415.1174, 353978.9165560771], ["Cook Strait", 14519643084.23072, 133569.43807438243], ["Sunda Strait", 2465200363.833765, 44527.260899000394], ["Taiwan Strait", 166569712655.73682, 411498.3631607854], ["Dardanelles Strait", 11897169147.76046, 100178.63730052409]] const usInterstateData = [['I-4', 133860.30238806643], ['I-5', 1841743.6685230015], ['I-8', 34419.884328052016], ['I-10', 662879.3942106421], ['I-12', 19601.661536140884], ['I-15', 1816556.2052351916], ['I-16', 88682.21453954442], ['I-17', 196173.201019035], ['I-19', 96426.05795676696], ['I-20', 347517.6947013905], ['I-24', 422558.98468291573], ['I-27', 617402.3082503016], ['I-29', 1111036.612182809], ['I-30', 231405.98002341753], ['I-35', 2158534.7689142646], ['I-37', 184231.0220610815], ['I-39', 489892.86533484043], ['I-40', 284554.8659969368], ['I-43', 228844.0768209733], ['I-44', 529117.6640772996], ['I-45', 394580.1764593749], ['I-49', 251521.75720683142], ['I-55', 1320388.2525614214], ['I-57', 544229.4386494028], ['I-59', 524278.150028191], ['I-64', 211843.6849640966], ['I-65', 1231049.0138181376], ['I-66', 24025.370784500737], ['I-66', 24025.370784500737], ['I-68', 15236.945179002872], ['I-69', 919351.2585854017], ['I-70', 277234.499188129], ['I-71', 361487.36346668913], ['I-72', 51460.97992201334], ['I-73', 97266.49617697322], ['I-74', 787056.102051467], ['I-75', 2278563.590324183], ['I-76', 118573.83898121146], ['I-76', 118573.83898121146], ['I-77', 850346.766475037], ['I-78', 34308.43505956534], ['I-79', 419586.7946081714], ['I-80', 335341.92972237605], ['I-81', 928130.9026841171], ['I-82', 132340.54932080585], ['I-83', 114410.28676654567], ['I-84', 709596.756786839], ['I-84', 709596.756786839], ['I-85', 546086.7051157606], ['I-86', 136716.7078032001], ['I-86', 136716.7078032001], ['I-87', 472844.76602409093], ['I-87', 472844.76602409093], ['I-88', 140816.2124300237], ['I-88', 140816.2124300237], ['I-89', 207356.9330399862], ['I-90', 930313.3415125563], ['I-91', 416438.4476691138], ['I-93', 250192.56712266232], ['I-94', 632131.6607593653], ['I-95', 2284530.2371507674], ['I-96', 96262.96337466157], ['I-97', 27501.47734637078], ['I-99', 96624.23888346303]] +const riverData = [['Rio Grande', 1343726.718946372], ['Amazon', 321654.3749335119], ['Mississippi', 2077320.423469436], ['Missouri', 1061247.347409356], ['Ohio', 417303.9821675314], ['Alabama', 402093.77536960616], ['Brazos', 527028.5171901184], ['Niger', 1407309.825626704], ['Danube', 598931.4337621646], ['Rhine', 593713.8890593982], ['Seine', 225832.28095087496], ['Thames', 51519.0292274607], ['Volga', 1388250.6642362578], ['Nile', 1625123.3465649856], ['Ganges', 997881.3863786167], ['Indus', 1324928.6616848952], ['Yellow', 833504.3887224646], ['Yangtze', 407730.1167946202], ['Tiber', 227457.74069036526]] + function makePlanet(name, diameter, mass, image) { return { name: name, @@ -1135,6 +1137,14 @@ function makeNaturals() { false )); + results.push(makeGIS( + riverData.sort((c1, c2) => { + return c1[0].localeCompare(c2[0]) + }), + "Rivers", + false + )); + results.sort((b1, b2) => { e1 = b1.constructor(); e2 = b2.constructor(); diff --git a/scripts/mapshaper/map-coords.py b/scripts/mapshaper/map-coords.py index ee02bfb5..f48696dc 100644 --- a/scripts/mapshaper/map-coords.py +++ b/scripts/mapshaper/map-coords.py @@ -94,14 +94,18 @@ elif config["mode"] == "filter": f"""-proj "+proj=ortho +lat_0={lat} +lon_0={lon}" """ f"""-info """ + f"""-style stroke-width={config["stroke-width"]} """ - f"""-o ../../{config["directory"]}/{item["name"]}.svg margin={config["stroke-width"]/2} height=1000 """ + f"""-o "../../{config["directory"]}/{item["name"]}.svg" margin={config["stroke-width"]/2} height=1000 """ ) - result = subprocess.check_output( - CMD, - shell=True, - stderr=subprocess.STDOUT - ) + try: + result = subprocess.check_output( + CMD, + shell=True, + stderr=subprocess.STDOUT + ) + except subprocess.CalledProcessError as exc: + print(exc.output) + continue for line in result.decode("utf-8").split("\n"): if "Bounds:" in line: diff --git a/scripts/mapshaper/rivers.json b/scripts/mapshaper/rivers.json new file mode 100644 index 00000000..f4384f44 --- /dev/null +++ b/scripts/mapshaper/rivers.json @@ -0,0 +1,29 @@ +{ + "name": "Rivers", + "directory": "/media/naturals/rivers", + "shapefile": "E:/macrovision/mapshaper/rivers/ne_10m_rivers_lake_centerlines.shp", + "mode": "filter", + "base-filter": "true", + "stroke-width": 10, + "items": [ + {"name": "Rio Grande", "filter": "this.properties.name_en == 'Rio Grande'"}, + {"name": "Amazon", "filter": "this.properties.name_en == 'Amazon'"}, + {"name": "Mississippi", "filter": "this.properties.name_en == 'Mississippi'"}, + {"name": "Missouri", "filter": "this.properties.name_en == 'Missouri'"}, + {"name": "Ohio", "filter": "this.properties.name_en == 'Ohio'"}, + {"name": "Alabama", "filter": "this.properties.name_en == 'Alabama'"}, + {"name": "Brazos", "filter": "this.properties.name_en == 'Brazos'"}, + {"name": "Niger", "filter": "this.properties.name_en == 'Niger'"}, + {"name": "Danube", "filter": "this.properties.name_en == 'Danube'"}, + {"name": "Rhine", "filter": "this.properties.name_en == 'Rhine'"}, + {"name": "Seine", "filter": "this.properties.name_en == 'Seine'"}, + {"name": "Thames", "filter": "this.properties.name_en == 'Thames'"}, + {"name": "Volga", "filter": "this.properties.name_en == 'Volga'"}, + {"name": "Nile", "filter": "this.properties.name_en == 'Nile'"}, + {"name": "Ganges", "filter": "this.properties.name_en == 'Ganges'"}, + {"name": "Indus", "filter": "this.properties.name_en == 'Indus'"}, + {"name": "Yellow", "filter": "this.properties.name_en == 'Yellow'"}, + {"name": "Yangtze", "filter": "this.properties.name_en == 'Yangtze'"}, + {"name": "Tiber", "filter": "this.properties.name_en == 'Tiber'"} + ] +} \ No newline at end of file