source: subversion/applications/editors/osm-editor/qt3/srtm.cpp @ 32040

Last change on this file since 32040 was 1158, checked in by nick, 14 years ago

moved current version to qt3 directory in preparation for qt4

File size: 1.6 KB
Line 
1/*
2    Copyright (C) 2005 Nick Whitelegg, Hogweed Software, nick@hogweed.org
3
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 2 of the License, or
7    (at your option) any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
17
18 */
19#include <iostream>
20#include "Canvas.h"
21#include  <cstdlib>
22using namespace std;
23
24int main(int argc,char* argv[])
25{
26        int shadingres=0, e=488000, n=126900, width=320, height=320, inc;
27        double scale=0.1;
28
29        while(argc>2 && argv[1][0]=='-' && strlen(argv[1])>1)
30        {
31                inc=2;
32                switch(argv[1][1])
33                {
34                        case 'e': e = atoi(argv[2]);
35                                          break;
36
37                        case 'n': n = atoi(argv[2]);
38                                          break;
39
40                        case 's': scale = atof(argv[2]);
41                                          break;
42
43                        case 'w': width = atoi(argv[2]);
44                                          break;
45
46                        case 'h': height = atoi(argv[2]);
47                                          break;
48
49                        case 'r': shadingres = atoi(argv[2]);
50                                          break;
51
52                        default : cerr<< "Unknown option -- " << argv[1];
53                                          inc=1;
54                }
55
56                argv+=inc;
57                argc-=inc;
58        }
59
60        cerr<<e <<" ";
61        cerr<<n <<" ";
62        cerr<<scale <<" ";
63        cerr<<width <<" ";
64        cerr<<height <<" ";
65        Canvas canvas ( e, n, scale, width, height, shadingres );
66        canvas.draw();
67        return 0;
68}
Note: See TracBrowser for help on using the repository browser.