/****************************************************************************/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 PCLoaderArcView.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Sept 200217///18// A reader of pois and polygons from shape files19/****************************************************************************/20#pragma once21#include <config.h>2223#include <string>24#include <utils/common/UtilExceptions.h>252627// ===========================================================================28// class declarations29// ===========================================================================30class OptionsCont;31class PCPolyContainer;32class PCTypeMap;33#ifdef HAVE_GDAL34class OGRLineString;35#endif363738// ===========================================================================39// class definitions40// ===========================================================================41/**42* @class PCLoaderArcView43* @brief A reader of pois and polygons from shape files44*45* The current importer works only if SUMO was compiled with GDAL-support.46* If not, an error message is generated.47*48* @todo reinsert import via shapelib49*/50class PCLoaderArcView {51public:52/** @brief Loads pois/polygons assumed to be stored as shape files-files53*54* If the option "shape-files" is set within the given options container,55* the files stored herein are parsed using "load", assuming this56* option contains file paths to files containing pois and polygons stored57* as shape-files.58*59* @param[in] oc The options container to get further options from60* @param[in] toFill The poly/pois container to add loaded polys/pois to61* @param[in] tm The type map to use for setting values of loaded polys/pois62* @exception ProcessError if something fails63*/64static void loadIfSet(OptionsCont& oc, PCPolyContainer& toFill, PCTypeMap& tm);656667private:68#ifdef HAVE_GDAL69static const PositionVector toShape(OGRLineString* geom, const std::string& tid);70#endif7172/** @brief Parses pois/polys stored within the given file73* @param[in] oc The options container to get further options from74* @param[in] toFill The poly/pois container to add loaded polys/pois to75* @param[in] tm The type map to use for setting values of loaded polys/pois76* @exception ProcessError if something fails77*/78static void load(const std::string& file, OptionsCont& oc, PCPolyContainer& toFill, PCTypeMap& tm);7980private:81static bool myWarnMissingProjection;8283private:84/// @brief Invalidated copy constructor.85PCLoaderArcView(const PCLoaderArcView&);8687/// @brief Invalidated assignment operator.88PCLoaderArcView& operator=(const PCLoaderArcView&);8990};919293