source: subversion/applications/lib/libimg/osm2img.cpp @ 34650

Last change on this file since 34650 was 2092, checked in by enxrah, 13 years ago

Nick didn't write this. I did :-)

File size: 1.3 KB
Line 
1/*
2    Copyright (C) 2007 Robert Hart, rob@bathterror.free-online.co.uk
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 Lesser 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 "Parser.h"
20#include "Node.h"
21#include "Img.h"
22#include <iostream>
23#include <fstream>
24#include <sstream>
25#include <string>
26#include "time.h"
27
28using std::cout;
29using std::cout;
30using std::endl;
31
32int main(int argc,char* argv[])
33{
34        if(argc<3)
35        {
36                cout<<"Usage: osm2img InOsmFile OutImgFile" << endl;
37                exit(1);
38        }
39       
40        std::ifstream in(argv[1]);
41        OSM::Components *comp1 = OSM::Parser::parse(in);
42        in.close();
43
44        std::ofstream out(argv[2]);
45        Img img;
46
47        //Pass interesting POIs, etc into IMG class.
48
49        img.WriteFile(out);
50        out.close();
51        return 0;
52}
Note: See TracBrowser for help on using the repository browser.