mapnik/plugins/input/osm/test.cpp

26 lines
493 B
C++
Raw Normal View History

2008-03-01 12:49:37 +01:00
#include "osm.h"
#include <iostream>
using std::cout;
using std::endl;
int main(int argc,char* argv[])
{
if(argc>=2)
2011-04-02 05:45:50 +02:00
{
osm_dataset dataset(argv[1]);
bounds b = dataset.get_bounds();
osm_item *item;
dataset.rewind();
2013-11-27 16:52:47 +01:00
while((item=dataset.next_item())!=nullptr)
{
std::cerr << item->to_string() << endl;
}
2011-04-02 05:45:50 +02:00
}
else
{
std::cerr<<"Usage: test OSMfile"<<std::endl;
exit(1);
}
return 0;
2008-03-01 12:49:37 +01:00
}