I've never coded in perl, but this seems to work : B.t.w. is there some way to do very large areas ? hunderds of thousands of km^2 ?
print GNUPLOT "set terminal table unset surface set contour -set cntrparam level incremental 0, $l, 1000 +set cntrparam level incremental 0, $l, 5000 #set table 'tmp.cnt' set output 'tmp.cnt' #set terminal table 'tmp.cnt' @@ -85,7 +85,16 @@ print "<nd ref='$prefix$s' />\n"; } print "<tag k='contour' v='elevation' />\n"; +if (int ($z / $ARGV[3]) * $ARGV[3] == $z) { + print "<tag k='contour_ext' v='elevation_major'\n"; +} +else { + if (int ($z / $ARGV[2]) * $ARGV[2] == $z) { + print "<tag k='contour_ext' v='elevation_minor'\n"; + } +} print "<tag k='ele' v='$z' />\n"; print "<tag k='created_by' v='mkcntr2' />\n"; print "</way>\n"; return $id; On Mon, Aug 25, 2008 at 5:57 PM, <[EMAIL PROTECTED]> wrote: > ---------------------------- Original Message ---------------------------- > Subject: Re: [OSM-talk] mkcntr2.pl: perl hackers wanted to fix contours.... > From: [EMAIL PROTECTED] > Date: Mon, August 25, 2008 11:56 am > To: "Gora Mohanty" <[EMAIL PROTECTED]> > -------------------------------------------------------------------------- > > Hello Gora, > Thanks for the offer of help. Attached is a very small excerpt of contours > from around the area where I'm mapping. I didn't want to do too much as > they generally come out with pretty huge files.... > > -- > $ du -ah *.osm > 184K contours.osm > 244M contours_10m.osm > 98M contours_25m.osm > 49M contours_50m.osm > -- > > The excerpt give 10m contours, but you should be able to generate whatever > you want from 'extract.txt'. If you need more data and don't want to > download the SRTM data for your/my area let me know and I'll cut out > another section. > > Regarding what the 'should' look like; I believe that in addition to whats > in the example OSM file, there should be additional tags such as > 'contour_ext = elevation_major' for major multiples, along with > 'contour_ext = elevation_medium' and 'contour_ext = elevation_minor' for > the others. > > I think this would be along the line of... > -- > <way id='1000005015' timestamp='0001-01-01T00:00:00'> > <nd ref='1000050442' /> > <nd ref='1000050443' /> > <nd ref='1000050444' /> > <nd ref='1000050445' /> > <tag k='contour' v='elevation' /> > <tag k='ele' v='1200' /> > <tag k='contour_ext' v='elevation_major' /> > <tag k='created_by' v='mkcntr2' /> > </way> > -- > > Once it's coded I can 'spin' a map and tell you whether this is correct. > > Thanks, > Simon. > > PS. There is a 1000m ceiling by default, most of my area is above that > which means that you don't get many contours.... > > > > > _______________________________________________ > talk mailing list > talk@openstreetmap.org > http://lists.openstreetmap.org/listinfo/talk > _______________________________________________ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk