/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file PCLoaderDlrNavteq.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Thu, 02.11.200617///18// A reader of pois and polygons stored in DLR-Navteq (Elmar)-format19/****************************************************************************/20#pragma once21#include <config.h>2223#include <string>24#include "PCPolyContainer.h"25#include "PCTypeMap.h"26#include <utils/common/UtilExceptions.h>272829// ===========================================================================30// class definitions31// ===========================================================================32class OptionsCont;333435// ===========================================================================36// class declarations37// ===========================================================================38/**39* @class PCLoaderDlrNavteq40* @brief A reader of pois and polygons stored in DLR-Navteq (Elmar)-format41*42* Reads pois stored in "pointcollection.txt" and polygons stored in43* "...polygons.txt"/"...water_polygons.txt", applies the given projection44* and network offset and stores the so build pois/polys into the given map.45*/46class PCLoaderDlrNavteq {47public:48/** @brief Loads pois/polygons assumed to be stored as according DLR-Navteq (Elmar)-files49*50* If the option "elmar-poi-files" is set within the given options container,51* the files stored herein are parsed using "loadPOIFiles", assuming this52* option contains file paths to files containing pois stored in DLR-Navteq53* "pointcollection.txt"-format.54*55* If the option "elmar-poly-files" is set within the given options container,56* the files stored herein are parsed using "loadPolyFiles", assuming this57* option contains file paths to files containing polygons stored in DLR-Navteq58* "...polygons.txt"/"...water_polygons.txt"-format.59*60* @param[in] oc The options container to get further options from61* @param[in] toFill The poly/pois container to add loaded polys/pois to62* @param[in] tm The type map to use for setting values of loaded polys/pois63* @exception ProcessError if something fails64*/65static void loadIfSet(OptionsCont& oc, PCPolyContainer& toFill,66PCTypeMap& tm);676869protected:70/** @brief Loads pois assumed to be stored as according DLR-Navteq (Elmar)-files71*72* Goes through the list of files given in "elmar-poi-files". Calls73* "loadPOIFile" using each of these as the first parameter.74*75* @param[in] oc The options container to get further options from76* @param[in] toFill The poly/pois container to add loaded pois to77* @param[in] tm The type map to use for setting values of loaded pois78* @exception ProcessError if something fails79*/80static void loadPOIFiles(OptionsCont& oc, PCPolyContainer& toFill,81PCTypeMap& tm);828384/** @brief Loads polygons assumed to be stored as according DLR-Navteq (Elmar)-files85*86* Goes through the list of files given in "elmar-poly-files". Calls87* "loadPolyFile" using each of these as the first parameter.88*89* @param[in] oc The options container to get further options from90* @param[in] toFill The poly/pois container to add loaded polys to91* @param[in] tm The type map to use for setting values of loaded polys92* @exception ProcessError if something fails93*/94static void loadPolyFiles(OptionsCont& oc, PCPolyContainer& toFill,95PCTypeMap& tm);969798/** @brief Loads DLR-Navteq (Elmar)-pois from the given file99* @param[in] file The name of the file to parse100* @param[in] oc The options container to get further options from101* @param[in] toFill The poly/pois container to add loaded polys to102* @param[in] tm The type map to use for setting values of loaded polys103* @exception ProcessError if something fails104*/105static void loadPOIFile(const std::string& file,106OptionsCont& oc, PCPolyContainer& toFill,107PCTypeMap& tm);108109110/** @brief Loads DLR-Navteq (Elmar)-polygons from the given file111* @param[in] file The name of the file to parse112* @param[in] oc The options container to get further options from113* @param[in] toFill The poly/pois container to add loaded polys to114* @param[in] tm The type map to use for setting values of loaded polys115* @exception ProcessError if something fails116*/117static void loadPolyFile(const std::string& file,118OptionsCont& oc, PCPolyContainer& toFill,119PCTypeMap& tm);120121122};123124125