mapnik/plugins/input/osm/test.cpp

26 lines
406 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[])
{
2008-03-02 14:23:50 +01:00
if(argc>=2)
2008-03-01 12:49:37 +01:00
{
2008-03-02 14:23:50 +01:00
osm_dataset dataset(argv[1]);
bounds b = dataset.get_bounds();
osm_item *item;
dataset.rewind();
while((item=dataset.next_item())!=NULL)
{
std::cerr << item->to_string() << endl;
}
2008-03-01 12:49:37 +01:00
}
2008-03-02 14:23:50 +01:00
else
2008-03-01 12:49:37 +01:00
{
2008-03-02 14:23:50 +01:00
std::cerr<<"Usage: test OSMfile"<<std::endl;
exit(1);
2008-03-01 12:49:37 +01:00
}
return 0;
}