8
$head[$i]=~s/[a-zA-Z]//g;
13
$xllcorner = $head[2];
14
$yllcorner = $head[3];
19
system("tail -n +7 $ARGV[0] > tmp");
20
print STDERR "Invoking gnuplot to generate contours at $l intervals\n";
21
open GNUPLOT, "|gnuplot";
22
print GNUPLOT "set terminal table
25
set cntrparam level incremental -500, $l, 9000
27
splot 'tmp' matrix w l
34
$lastnode = 1000050000;
35
$lastway = 1000050000;
38
print "<?xml version='1.0' encoding='UTF-8'?>
39
<osm version='0.5' generator='mkcntr'>
40
<bound box='-90,-180,90,180' origin='mkcntr'/>
46
if($nid0 && $nid0!=$nidF){
69
$lon = $xllcorner+$cellsize*$_[0];
70
$lat = $yllcorner+$cellsize*($nrows-$_[1]);
72
print "<node id='$prefix$id' timestamp='0001-01-01T00:00:00' lat='$lat' lon='$lon' />\n";
79
print "<way id='$prefix$id' timestamp='0001-01-01T00:00:00'>\n";
82
print "<nd ref='$prefix$s' />\n";
84
print "<tag k='contour' v='elevation' />\n";
86
if ($ARGV[2] && $ARGV[3]) {
87
if ( $z % $ARGV[3] == 0 ) {
88
print "<tag k='contour_ext' v='elevation_major'\n />";
90
if ( $z % $ARGV[2] == 0 ) {
91
print "<tag k='contour_ext' v='elevation_medium'\n />";
93
print "<tag k='contour_ext' v='elevation_minor'\n />";
98
print "<tag k='ele' v='$z' />\n";
99
print "<tag k='created_by' v='mkcntr' />\n";