#!/bin/bash #Daten data="listing2.csv" #Ausgabe output="mitteleuropa.ps" #größter Kreis ist $circle cm groß circle=5 #GMT-Wrapper? gmt=$(which GMT) #Küstenlinie $gmt pscoast -JM16c -R4/20/43/55 -Di -B -W0.3pt -S173/216/230 -A50 -G230 -N1/0.25p,- -P -K > "$output" #Maximum herausfinden max=$(cut -d',' -f3 "$data" | sort -n | tail -1) #Zeilenweise nicht-leere Zeilen bearbeiten sed -e '/^\s*$/d' "$data" | while read line; do amount=$(echo $line | cut -d',' -f3) lon=$(echo $line | cut -d',' -f5) lat=$(echo $line | cut -d',' -f4) #Größe des Kreises berechnen size=$(echo "scale=2; $amount/$max*$circle" | bc) #Kreis zur Karte hinzufügen echo "$lon $lat" | $gmt psxy -R -J -Sc${size}c -G255/144/0 -O -K >> "$output" done; #Ortsnamendaten in GMT-Datei umwandeln sed -e '/^\s*$/d' "$data" | awk -F',' '{printf "%s %s 12 0 1 CM %s\n", $5, $4, $2}' | iconv -f "UTF-8" -t "iso-8859-1" -o locations.txt #..und Darstellen #Stadtnamen $gmt pstext -R -J -G0/0/0 -Dj0.2/0.2 -O < locations.txt >> "$output"