Procházet zdrojové kódy

Add some artificial landmasses from the UAE

master
Fen Dweller před 4 roky
rodič
revize
769f22fd9e
9 změnil soubory, kde provedl 65 přidání a 4 odebrání
  1. +11
    -0
      media/attribution.js
  2. +6
    -0
      media/naturals/artificial-land/Nakhlat Jabal Ali.svg
  3. +6
    -0
      media/naturals/artificial-land/Nakhlat Jumeira.svg
  4. +6
    -0
      media/naturals/artificial-land/Palm Deira.svg
  5. +6
    -0
      media/naturals/artificial-land/World Islands.svg
  6. +10
    -1
      presets/naturals.js
  7. +2
    -1
      scripts/mapshaper/.gitignore
  8. +3
    -2
      scripts/mapshaper/map-coords.py
  9. +15
    -0
      scripts/mapshaper/uae-landmasses.json

+ 11
- 0
media/attribution.js Zobrazit soubor

@@ -15706,6 +15706,13 @@ const attributionData = {
"naturalearth"
]
},
{
prefix: "./media/naturals/artificial-land",
all: "https://gadm.org/download_country_v3.html",
authors: [
"gadm"
]
},
{
prefix: "./media/naturals/canals",
all: "https://www.naturalearthdata.com/downloads/10m-physical-vectors/",
@@ -21280,6 +21287,10 @@ const attributionData = {
"name": "Nolow",
"url": "https://twitter.com/Cheetahfluff/"
},
"gadm": {
"name": "Database of Global Administrative Areas",
"url": "https://gadm.org/"
},
}
}



+ 6
- 0
media/naturals/artificial-land/Nakhlat Jabal Ali.svg
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 6
- 0
media/naturals/artificial-land/Nakhlat Jumeira.svg
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 6
- 0
media/naturals/artificial-land/Palm Deira.svg
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 6
- 0
media/naturals/artificial-land/World Islands.svg
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 10
- 1
presets/naturals.js Zobrazit soubor

@@ -900,7 +900,7 @@ const riverData = [['Rio Grande', 1343726.718946372], ['Amazon', 321654.37493351
const canalData = [['Suez Canal', 142645.14813263412]]
const famousPlaceData = [["Bermuda Triangle", 2912862312063.4375, 1701656.8370467045]]
const landData = [["0,0", 1.27560e+7], ["0,90", 1.27560e+7], ["0,180", 1.27560e+7], ["0,-90", 1.27560e+7]]
const artificialLandData = [['Nakhlat Jabal Ali', 7161.263086713934], ['Nakhlat Jumeira', 5274.965892367926], ['World Islands', 8776.2656000156], ['Palm Deira', 10594.141235040714]];

function makePlanet(name, diameter, mass, image) {
return {
@@ -1173,6 +1173,15 @@ function makeNaturals() {
false
));


results.push(makeGIS(
artificialLandData.sort((c1, c2) => {
return c1[0].localeCompare(c2[0])
}),
"Artificial Land",
false
));

results.sort((b1, b2) => {
e1 = b1.constructor();
e2 = b2.constructor();


+ 2
- 1
scripts/mapshaper/.gitignore Zobrazit soubor

@@ -1 +1,2 @@
temp.*
temp.*
**/

+ 3
- 2
scripts/mapshaper/map-coords.py Zobrazit soubor

@@ -90,7 +90,7 @@ elif config["mode"] == "filter":
f"""mapshaper -i temp.shp """
f"""-filter "{config["base-filter"]}" """
f"""-filter "{item["filter"]}" """
f"""-simplify interval=1000 """
f"""-simplify interval={config["simplify-size"]} """
f"""-proj "+proj=ortho +lat_0={lat} +lon_0={lon}" """
f"""-info """ +
f"""-style stroke-width={config["stroke-width"]} """
@@ -104,9 +104,10 @@ elif config["mode"] == "filter":
stderr=subprocess.STDOUT
)
except subprocess.CalledProcessError as exc:
print(exc.output)
print(exc.output.decode("utf-8"))
continue
print(result.decode("utf-8"))
for line in result.decode("utf-8").split("\n"):
if "Bounds:" in line:
coords = list(map(float, line[7:].strip().split(",")))


+ 15
- 0
scripts/mapshaper/uae-landmasses.json Zobrazit soubor

@@ -0,0 +1,15 @@
{
"name": "Artificial Land",
"directory": "/media/naturals/artificial-land/",
"shapefile": "./uae-landmasses/gadm36_ARE_3.shp",
"mode": "filter",
"base-filter": "true",
"stroke-width": 1,
"simplify-size": 3,
"items": [
{"name": "Nakhlat Jabal Ali", "filter": "this.properties.NAME_3 == 'Nakhlat Jabal Ali'"},
{"name": "Nakhlat Jumeira", "filter": "this.properties.NAME_3 == 'Nakhlat Jumeira'"},
{"name": "World Islands", "filter": "this.properties.NAME_3 == 'World Islands'"},
{"name": "Palm Deira", "filter": "this.properties.NAME_3 == 'Palm Deira (Under Construction)'"}
]
}

Načítá se…
Zrušit
Uložit