Geoc Map Cubes
I recently posted about creating paper craft map cubes using GeoScript Groovy. This time, let’s use the geoc command line interface.
First, create a directory, move into it, and download the unzip some Natural Earth data.
#!/bin/bash
mkdir -p cube
cd cube
curl https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip -L --output countries.zip
curl https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_ocean.zip -L --output ocean.zip
unzip countries.zip -d countries
unzip ocean.zip -d ocean
Then let’s create some simple SLD styles.
geoc style create -s fill="#a5bfdd" -s fill-opacity=1.0 > ocean.sld
geoc style create -s fill="#ffffff" -s fill-opacity=1.0 -s stroke="#b2b2b2" -s stroke-width=0.5 > countries.sld
Finally, we can use the geoc map cube comand.
geoc map cube -f map_cube.png -t -o -i 'Earth' -c 'Natural Earth' \
-l "layertype=layer file=ocean/ne_110m_ocean.shp style=ocean.sld" \
-l "layertype=layer file=countries/ne_110m_admin_0_countries.shp style=countries.sld"