File: mkicons.sh.old

package info (click to toggle)
gosmore 0.0.0.svn30327-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,400 kB
  • ctags: 1,111
  • sloc: cpp: 6,701; xml: 4,090; ansic: 1,176; java: 1,061; sh: 164; makefile: 145; lex: 108
file content (41 lines) | stat: -rwxr-xr-x 1,410 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# svn co http://svn.openstreetmap.org/applications/share/map-icons/square.big
# svn co http://svn.openstreetmap.org/applications/share/map-icons/classic.big
# svn co http://svn.openstreetmap.org/applications/share/map-icons/square.small
# svn co http://svn.openstreetmap.org/applications/share/map-icons/classic.small
echo Creating temporary directory '"osmpnms/"' and converting icons to pnm
mkdir osmpnms
cd osmpnms
# Create dummy to force GCD to (1,1)
echo 'P6
1 1
255 
0 0 0
'>fix.pnm
for n in `find ../ -iname "*.png"`
do 
  A=${n%%.png}
  B=${A//\//_}
  pngtopnm -background \#11EE22 $n |pnmdepth 255 >"${B:3}.pnm"
done
# These make nice POIs, but are not needed to render OSM maps :
rm -f *geocach* \
  {classic,square}.{big,small}_{people,waypoint,wlan,rendering}* \

#  {classic,square}.big_*

echo Creating the montage and removing the temporary directory
ulimit -n 2048
../../../netpbm-10.26.46/editor/pnmmontage -data ../icons.csv *.pnm>../icons.pnm
cd ..
rm -rf osmpnms
ppmtobmp icons.pnm >icons.bmp
# Suppress the icons Ulf is using to highlight errors
echo 'classic.big_misc_deprecated.pnm:1:1:1:1
square.big_misc_deprecated.pnm:1:1:1:1
classic.small_misc_deprecated.pnm:1:1:1:1
square.small_misc_deprecated.pnm:1:1:1:1
classic.big_misc_no_icon.pnm:1:1:1:1
square.big_misc_no_icon.pnm:1:1:1:1
classic.small_misc_no_icon.pnm:1:1:1:1
square.small_misc_no_icon.pnm:1:1:1:1' >>icons.csv