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[])
|
|
|
|
{
|
2011-11-14 04:37:50 +01:00
|
|
|
if(argc>=2)
|
2011-04-02 05:45:50 +02:00
|
|
|
{
|
2011-11-14 04:37:50 +01: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)
|
2011-11-14 04:37:50 +01:00
|
|
|
{
|
|
|
|
std::cerr << item->to_string() << endl;
|
|
|
|
}
|
2011-04-02 05:45:50 +02:00
|
|
|
}
|
2011-11-14 04:37:50 +01:00
|
|
|
else
|
|
|
|
{
|
|
|
|
std::cerr<<"Usage: test OSMfile"<<std::endl;
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
return 0;
|
2008-03-01 12:49:37 +01:00
|
|
|
}
|