actually parse the data that flowing thru osmium
This commit is contained in:
		
							parent
							
								
									06ddceeac0
								
							
						
					
					
						commit
						80046b646b
					
				@ -302,7 +302,8 @@ int Extractor::Run(int argc, char *argv[])
 | 
				
			|||||||
        ExtractionNode result_node;
 | 
					        ExtractionNode result_node;
 | 
				
			||||||
        ExtractionWay result_way;
 | 
					        ExtractionWay result_way;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        while (osmium::memory::Buffer buffer = reader.read()) {
 | 
					        while (osmium::memory::Buffer buffer = reader.read())
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            for (osmium::OSMEntity &entity : buffer)
 | 
					            for (osmium::OSMEntity &entity : buffer)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                switch (entity.type())
 | 
					                switch (entity.type())
 | 
				
			||||||
@ -310,24 +311,24 @@ int Extractor::Run(int argc, char *argv[])
 | 
				
			|||||||
                case osmium::item_type::node:
 | 
					                case osmium::item_type::node:
 | 
				
			||||||
                    ++number_of_nodes;
 | 
					                    ++number_of_nodes;
 | 
				
			||||||
                    result_node.Clear();
 | 
					                    result_node.Clear();
 | 
				
			||||||
                    // luabind::call_function<void>(
 | 
					                    luabind::call_function<void>(
 | 
				
			||||||
                    //     lua_state,
 | 
					                        lua_state,
 | 
				
			||||||
                    //     "node_function",
 | 
					                        "node_function",
 | 
				
			||||||
                    //     boost::cref(static_cast<osmium::Node &>(entity)),
 | 
					                        boost::cref(static_cast<osmium::Node &>(entity)),
 | 
				
			||||||
                    //     boost::ref(result_node));
 | 
					                        boost::ref(result_node));
 | 
				
			||||||
                    // extractor_callbacks->ProcessNode(static_cast<osmium::Node &>(entity),
 | 
					                    extractor_callbacks->ProcessNode(static_cast<osmium::Node &>(entity),
 | 
				
			||||||
                    //                                  result_node);
 | 
					                                                     result_node);
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                case osmium::item_type::way:
 | 
					                case osmium::item_type::way:
 | 
				
			||||||
                    ++number_of_ways;
 | 
					                    ++number_of_ways;
 | 
				
			||||||
                    result_way.Clear();
 | 
					                    result_way.Clear();
 | 
				
			||||||
                    // luabind::call_function<void>(
 | 
					                    luabind::call_function<void>(
 | 
				
			||||||
                    //     lua_state,
 | 
					                        lua_state,
 | 
				
			||||||
                    //     "way_function",
 | 
					                        "way_function",
 | 
				
			||||||
                    //     boost::cref(static_cast<osmium::Way &>(entity)),
 | 
					                        boost::cref(static_cast<osmium::Way &>(entity)),
 | 
				
			||||||
                    //     boost::ref(result_way));
 | 
					                        boost::ref(result_way));
 | 
				
			||||||
                    // extractor_callbacks->ProcessWay(static_cast<osmium::Way &>(entity),
 | 
					                    extractor_callbacks->ProcessWay(static_cast<osmium::Way &>(entity),
 | 
				
			||||||
                    //                                 result_way);
 | 
					                                                    result_way);
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                case osmium::item_type::relation:
 | 
					                case osmium::item_type::relation:
 | 
				
			||||||
                    ++number_of_relations;
 | 
					                    ++number_of_relations;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user