new blanker world map template

to complete the trifecta.  it has rivers, and no political borders.
This commit is contained in:
Justin Kunimune 2024-01-09 13:16:23 -05:00
parent 3d35c305b6
commit 00c7fd9193
4 changed files with 285 additions and 2 deletions

View File

@ -90,6 +90,9 @@ pip3 install numpy pyshp shapely
~~~~ ~~~~
Note that `compose_maps.py` requires input data from [naturalearthdata.com](http://www.naturalearthdata.com/downloads/), which should be downloaded and placed in `src/zupplemental/shapefiles/`. Note that `compose_maps.py` requires input data from [naturalearthdata.com](http://www.naturalearthdata.com/downloads/), which should be downloaded and placed in `src/zupplemental/shapefiles/`.
You can either put the zip file in there or extract the individual files and put them in; it works either way.
I don't have a complete list of what data files are needed, so I usually just run it and look at the error message to see what it wants me to download.
You can alternatively scroll through `compose_maps.py` to see what files it references (anything that starts with "ne_" is the name of a Natural Earth dataset).
## Wherefore? ## Wherefore?
I'll write a little blurb here later. I'll write a little blurb here later.

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 107 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 2.9 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

@ -159,6 +159,28 @@ def main():
+ label_shapes('ne_50m_admin_0_countries', label_type="polity", secondary_attr="note_adm0") + label_shapes('ne_50m_admin_0_countries', label_type="polity", secondary_attr="note_adm0")
) )
# physical template
write_svg_code_to_file(
"../../input/Advanced/Template coastlines.svg",
' <g transform="matrix(1,0,0,-1,180,90)">\n'
' <rect id="background" class="water" x="-180" y="-90" width="360" height="180" />\n'
' <clipPath id="clipPath">\n'
' <use href="#background" xlink:href="#background" />\n'
' </clipPath>\n'
' <g clip-path="url(#clipPath)">\n'
' <g class="land">\n'
+ plot_shapes('ne_110m_land', trim_antarctica=True, mark_antarctica=True) +
' </g>\n'
' <g class="river">\n'
+ plot_shapes('ne_110m_rivers_lake_centerlines') +
' </g>\n'
' <g class="water">\n'
+ plot_shapes('ne_110m_lakes') +
' </g>\n'
' </g>\n'
' </g>\n'
)
# political template (countries) # political template (countries)
write_svg_code_to_file( write_svg_code_to_file(
"../../input/Advanced/Template countries.svg", "../../input/Advanced/Template countries.svg",
@ -180,7 +202,7 @@ def main():
add_title=True, mode="circle") + add_title=True, mode="circle") +
' </g>\n' ' </g>\n'
' <g class="water">\n' ' <g class="water">\n'
+ plot_shapes('ne_110m_lakes', max_rank=4) + + plot_shapes('ne_110m_lakes') +
' </g>\n' ' </g>\n'
' </g>\n' ' </g>\n'
' </g>\n' ' </g>\n'
@ -223,7 +245,7 @@ def main():
add_title=False, mode="trace") + add_title=False, mode="trace") +
' </g>\n' ' </g>\n'
' <g class="water">\n' ' <g class="water">\n'
+ plot_shapes('ne_50m_lakes', max_rank=4) + + plot_shapes('ne_50m_lakes') +
' </g>\n' ' </g>\n'
' </g>\n' ' </g>\n'
' </g>\n' ' </g>\n'