Overpass API regression suite coverage (Nova Scotia) / overpass_api/data/way_geometry_store.cc
overpass_api/data/way_geometry_store.cc
129 of 143 instrumented lines run by the suite (90.2%) at 8edf11b0419c (this file on GitHub).
runnever runcolumns: line, executions, queries (click for the queries that run the line)
1/** Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Roland Olbricht et al.2 *3 * This file is part of Overpass_API.4 *5 * Overpass_API is free software: you can redistribute it and/or modify6 * it under the terms of the GNU Affero General Public License as7 * published by the Free Software Foundation, either version 3 of the8 * License, or (at your option) any later version.9 *10 * Overpass_API is distributed in the hope that it will be useful,11 * but WITHOUT ANY WARRANTY; without even the implied warranty of12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * GNU General Public License for more details.14 *15 * You should have received a copy of the GNU Affero General Public License16 * along with Overpass_API. If not, see <http://www.gnu.org/licenses/>.17 */19#include "../data/collect_members.h"20#include "../data/way_geometry_store.h"22#include <map>25template< typename Object >26Ranges< Uint32_Index > small_way_nd_indices27 (const Statement* stmt, Resource_Manager& rman,28 typename std::map< Uint31_Index, std::vector< Object > >::const_iterator ways_begin,29 typename std::map< Uint31_Index, std::vector< Object > >::const_iterator ways_end)49template< typename Object >50std::vector< Node::Id_Type > small_way_nd_ids(const std::map< Uint31_Index, std::vector< Object > >& ways)74std::map< Uint32_Index, std::vector< Node_Skeleton > > small_way_members75 (const Statement* stmt, Resource_Manager& rman,76 const std::map< Uint31_Index, std::vector< Way_Skeleton > >& ways)85Way_Geometry_Store::Way_Geometry_Store86 (const std::map< Uint31_Index, std::vector< Way_Skeleton > >& ways, const Statement& query, Resource_Manager& rman)88 // Retrieve all nodes referred by the ways.893520414 q std::map< Uint32_Index, std::vector< Node_Skeleton > > way_members_ = small_way_members(&query, rman, ways);91 // Order node ids by id.923520414 q for (std::map< Uint32_Index, std::vector< Node_Skeleton > >::iterator it = way_members_.begin();103Way_Geometry_Store::Way_Geometry_Store104 (const std::map< Uint31_Index, std::vector< Attic< Way_Skeleton > > >& ways,105 const Statement& query, Resource_Manager& rman)107 // Retrieve all nodes referred by the ways.1131793232 q keep_matching_skeletons(nodes, timeless.current, timeless.attic, rman.get_desired_timestamp());117std::vector< Quad_Coord > Way_Geometry_Store::get_geometry(const Way_Skeleton& way) const126Way_Bbox_Geometry_Store::Way_Bbox_Geometry_Store(127 const std::map< Uint31_Index, std::vector< Way_Skeleton > >& ways,128 const Statement& query, Resource_Manager& rman,129 double south_, double north_, double west_, double east_)136Way_Bbox_Geometry_Store::Way_Bbox_Geometry_Store(137 const std::map< Uint31_Index, std::vector< Attic< Way_Skeleton > > >& ways,138 const Statement& query, Resource_Manager& rman,139 double south_, double north_, double west_, double east_)146bool Way_Bbox_Geometry_Store::matches_bbox(uint32 ll_upper, uint32 ll_lower) const158std::vector< Quad_Coord > Way_Bbox_Geometry_Store::get_geometry(const Way_Skeleton& way) const1951014287 q ::lat(result[i].ll_upper, result[i].ll_lower), ::lon(result[i].ll_upper, result[i].ll_lower));1971014287 q ::lat(result[i+1].ll_upper, result[i+1].ll_lower), ::lon(result[i+1].ll_upper, result[i+1].ll_lower));20841 q ::lat(result[i-1].ll_upper, result[i-1].ll_lower), ::lon(result[i-1].ll_upper, result[i-1].ll_lower));