R package for downloading OpenStreetMap data
at main 53 lines 2.1 kB view raw
1/*************************************************************************** 2 * Project: osmdata 3 * File: trace-osm.h 4 * Language: C++ 5 * 6 * osmdata is free software: you can redistribute it and/or modify it under 7 * the terms of the GNU General Public License as published by the Free 8 * Software Foundation, either version 3 of the License, or (at your option) 9 * any later version. 10 * 11 * osmdata is distributed in the hope that it will be useful, but WITHOUT ANY 12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 * details. 15 * 16 * You should have received a copy of the GNU General Public License along with 17 * osm-router. If not, see <http://www.gnu.org/licenses/>. 18 * 19 * Author: Mark Padgham 20 * E-Mail: mark.padgham@email.com 21 * 22 * Description: Functions to trace OSM ways and store in C++ dynamic arrays 23 * (no RCpp here). 24 * 25 * Limitations: 26 * 27 * Dependencies: none (rapidXML header included in osmdata) 28 * 29 * Compiler Options: -std=c++11 30 ***************************************************************************/ 31 32#pragma once 33 34#include "common.h" 35 36void trace_relation (Relations::const_iterator &itr_rel, 37 osm_str_vec &relation_ways, 38 std::vector <std::pair <std::string, std::string> > & relation_kv); 39 40void trace_multipolygon (Relations::const_iterator &itr_rel, const Ways &ways, 41 const Nodes &nodes, double_arr2 &lon_vec, double_arr2 &lat_vec, 42 string_arr2 &rowname_vec, std::vector <std::string> &ids); 43 44void trace_multilinestring (Relations::const_iterator &itr_rel, 45 const std::string role, const Ways &ways, const Nodes &nodes, 46 double_arr2 &lon_vec, double_arr2 &lat_vec, string_arr2 &rowname_vec, 47 std::vector <osmid_t> &ids); 48 49osmid_t trace_way (const Ways &ways, const Nodes &nodes, osmid_t first_node, 50 const osmid_t &wayi_id, std::vector <double> &lons, 51 std::vector <double> &lats, std::vector <std::string> &rownames, 52 const bool append); 53