|
@@ -0,0 +1,23 @@
|
|
|
+#How to generate new scale bar thumbnail
|
|
|
+#=======================================
|
|
|
+#Expects North Carolina dataset. The thumbnail height should be 24 px.
|
|
|
+#
|
|
|
+
|
|
|
+export GRASS_RENDER_IMMEDIATE=png
|
|
|
+export GRASS_RENDER_TRUECOLOR=TRUE
|
|
|
+export GRASS_RENDER_WIDTH=300
|
|
|
+export GRASS_RENDER_HEIGHT=300
|
|
|
+g.region raster=elevation
|
|
|
+
|
|
|
+for STYLE in 1a 1b 2 3 4 5 6 7a 7b 8a 8b 9 fancy_compass basic_compass
|
|
|
+do
|
|
|
+ echo ${STYLE}
|
|
|
+ export GRASS_RENDER_FILE=n_arrow_${STYLE}.png
|
|
|
+ d.northarrow style=${STYLE} at=20,20
|
|
|
+ mogrify -trim n_arrow_${STYLE}.png
|
|
|
+ identify -format "%[fx:w]x%[fx:h]" n_arrow_${STYLE}.png
|
|
|
+# convert n_arrow_${STYLE}.png -gravity center -background white -extent 170x24 n_arrow_${STYLE}.png
|
|
|
+ convert n_arrow_${STYLE}.png -gravity center -background white n_arrow_${STYLE}.png
|
|
|
+ optipng -o5 n_arrow_${STYLE}.png n_arrow_${STYLE}.png --quiet
|
|
|
+done
|
|
|
+
|