diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..0ac2ceb7 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..eb71b40a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +wikidata diff --git a/QGIS/Style_Biomes.qml b/QGIS/Style_Biomes.qml new file mode 100644 index 00000000..c482cfe3 --- /dev/null +++ b/QGIS/Style_Biomes.qml @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 2 + diff --git a/QGIS/add_random_points.php b/QGIS/add_random_points.php new file mode 100644 index 00000000..46452498 --- /dev/null +++ b/QGIS/add_random_points.php @@ -0,0 +1,81 @@ +\n" ); +} + +// FIXME: This script created a few cases of self-intersection that must be fixed manually +// in QGIS: Vector -> Geometry Tools -> Check Validity + +$cells = json_decode(file_get_contents($argv[1]), true); + + +for ($i=0; $i<$iterations; $i++) { + $lookup = array(); + + foreach ($cells['features'] as &$cell) { + $points = $cell['geometry']['coordinates'][0]; + + $prev = null; + $newpoints = array(); + + foreach ($points as $point) { + if ($prev) { + $distance = sqrt(pow($prev[0] - $point[0], 2) + pow($prev[1] - $point[1], 2)); + if ($distance == 0) continue; + + if ($distance > $min_distance) { + $id_a = $prev[0]."-".$prev[1]; + $id_b = $point[0]."-".$point[1]; + + if (isset($lookup[$id_a."--".$id_b])) { + $newpoints[] = $lookup[$id_a."--".$id_b]; + } elseif (isset($lookup[$id_b."--".$id_a])) { + $newpoints[] = $lookup[$id_b."--".$id_a]; + } else { + $x = ($prev[0]+$point[0])/2.0; + $y = ($prev[1]+$point[1])/2.0; + + $r = mt_rand() / mt_getrandmax(); // 0-1 + $r = ($r+1) / 2; // 0.5 - 1.0 + + // if we define dx=x2-x1 and dy=y2-y1, then the normals are (-dy, dx) and (dy, -dx). + $dx = $point[0] - $x; + $dy = $point[1] - $y; + + if (mt_rand() / mt_getrandmax() < 0.5) { + $x_off = -$dy; + $y_off = $dx; + } else { + $x_off = $dy; + $y_off = -$dx; + } + + $x_off *= $r * $max_deviation; + $x_off = max(min($x_off, $max_abs), $max_abs*-1); + + $y_off *= $r * $max_deviation; + $y_off = max(min($y_off, $max_abs), $max_abs*-1); + + $p = array($x + $x_off, $y + $y_off); + $lookup[$id_a."--".$id_b] = $p; + $newpoints[] = $p; + } + } + } + $newpoints[] = $point; + $prev = $point; + } + $cell['geometry']['coordinates'][0] = $newpoints; + } +} + +echo json_encode($cells, JSON_PRETTY_PRINT); + +?> diff --git a/index.html b/index.html index 253e1e0f..02ae3577 100644 --- a/index.html +++ b/index.html @@ -172,7 +172,7 @@ - + @@ -254,50 +254,50 @@ - + - + - + - + - + - + - + - + - + @@ -306,7 +306,7 @@ - + @@ -315,7 +315,7 @@ - + @@ -324,7 +324,7 @@ - + @@ -342,7 +342,7 @@ - + @@ -351,7 +351,7 @@ - + @@ -359,37 +359,37 @@ - + - + - + - + - + - + @@ -421,7 +421,7 @@ - + @@ -429,23 +429,23 @@ - + - + - + - + @@ -455,7 +455,7 @@ - + @@ -463,14 +463,14 @@ - + - + @@ -479,26 +479,26 @@ - + - + - + - + @@ -506,25 +506,25 @@ - + - + - + - + @@ -532,13 +532,13 @@ - + - + @@ -549,7 +549,7 @@ - + @@ -557,7 +557,7 @@ - + @@ -565,7 +565,7 @@ - + @@ -575,7 +575,7 @@ - + @@ -585,7 +585,7 @@ - + @@ -595,7 +595,7 @@ - + @@ -613,7 +613,7 @@ - + @@ -622,7 +622,7 @@ - + @@ -630,44 +630,44 @@ - + - + - + - + - + - + - + @@ -685,14 +685,14 @@ - + - + @@ -703,24 +703,24 @@ - + - + - + - + @@ -730,7 +730,7 @@ - + @@ -738,14 +738,14 @@ - + - + @@ -754,20 +754,20 @@ - + - + - + @@ -976,7 +976,7 @@ - + @@ -1049,7 +1049,7 @@ #0000ff - + - + - + - + - - + + - + @@ -1159,7 +1159,7 @@ - + - + - + @@ -1217,7 +1217,7 @@ 1 - + - + @@ -1342,7 +1342,7 @@ 0.3 - + - + @@ -1387,7 +1387,7 @@ 5 - + - + @@ -1448,7 +1448,7 @@ - + @@ -1499,7 +1499,7 @@ - + @@ -1546,7 +1546,7 @@ - +
Please ensure the element is toggled on!Please ensure the element is toggled on!
Urban color @@ -1087,7 +1087,7 @@
Shift by axes @@ -1114,7 +1114,7 @@
Ocean layers @@ -1129,7 +1129,7 @@
Background @@ -1144,10 +1144,10 @@ #53679f
Type
Size @@ -1188,7 +1188,7 @@ .25
Shift by axes @@ -1197,7 +1197,7 @@
Style
Density @@ -1236,7 +1236,7 @@
Stroke
Labels size @@ -1359,7 +1359,7 @@
Color scheme
Simplify line @@ -1407,7 +1407,7 @@
Filter
@@ -1701,7 +1701,7 @@
- + @@ -1814,12 +1814,12 @@

Join our Discord server and Reddit community to ask questions, get help and share created maps. You may support the project on Patreon.

The project is under active development. For older versions see the changelog. To track the development progress see the devboard. Please report bugs here. You can also contact me directly via email.

A special thanks to all supporters!

-

Supporters: Aaron Meyer, Ahmad Amerih, AstralJacks, aymeric, Billy Dean Goehring, Branndon Edwards, - Chase Mayers, Curt Flood, cyninge, Dino Princip, E.M. White, es, Fondue, Fritjof Olsson, Gatsu, Johan Fröberg, Jonathan Moore, - Joseph Miranda, Kate, KC138, Luke Nelson, Markus Finster, Massimo Vella, Mikey, Nathan Mitchell, Paavi1, Pat, Ryan Westcott, - Sasquatch, Shawn Spencer, Sizz_TV, Timothée CALLET, UTG community, Vlad Tomash, Wil Sisney, William Merriott, Xariun, - Gun Metal Games, Scott Marner, Spencer Sherman, Valerii Matskevych, Alloyed Clavicle, Stewart Walsh, Ruthlyn Mollett (Javan), - Benjamin Mair-Pratt, Diagonath, Alexander Thomas, Ashley Wilson-Savoury, William Henry, Preston Brooks, JOSHUA QUALTIERI, +

Supporters: Aaron Meyer, Ahmad Amerih, AstralJacks, aymeric, Billy Dean Goehring, Branndon Edwards, + Chase Mayers, Curt Flood, cyninge, Dino Princip, E.M. White, es, Fondue, Fritjof Olsson, Gatsu, Johan Fröberg, Jonathan Moore, + Joseph Miranda, Kate, KC138, Luke Nelson, Markus Finster, Massimo Vella, Mikey, Nathan Mitchell, Paavi1, Pat, Ryan Westcott, + Sasquatch, Shawn Spencer, Sizz_TV, Timothée CALLET, UTG community, Vlad Tomash, Wil Sisney, William Merriott, Xariun, + Gun Metal Games, Scott Marner, Spencer Sherman, Valerii Matskevych, Alloyed Clavicle, Stewart Walsh, Ruthlyn Mollett (Javan), + Benjamin Mair-Pratt, Diagonath, Alexander Thomas, Ashley Wilson-Savoury, William Henry, Preston Brooks, JOSHUA QUALTIERI, Hilton Williams, Katharina Haase, Hisham Bedri, Ian arless, Karnat, Bird, Kevin and many others!