/****************************************************************************/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 PCNetProjectionLoader.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date Thu, 02.11.200618///19// A reader for a SUMO network's projection description20/****************************************************************************/21#pragma once22#include <config.h>2324#include <string>25#include <utils/xml/SUMOSAXHandler.h>26#include <utils/common/UtilExceptions.h>27#include <utils/geom/Position.h>282930// ===========================================================================31// class definitions32// ===========================================================================33class OptionsCont;343536// ===========================================================================37// class declarations38// ===========================================================================39/**40* @class PCNetProjectionLoader41* @brief A reader for a SUMO network's projection description42*/43class PCNetProjectionLoader : public SUMOSAXHandler {44public:45/** @brief Loads network projection if wished46*47* @param[in] file The network file from which to parse the location element48* @param[in] shift The shift of the decimal point when interpreting loaded coordinates49*/50static void load(const std::string& file, double scale);515253protected:54/** @brief Constructor55*/56PCNetProjectionLoader(double scale);575859/// @brief Destructor60~PCNetProjectionLoader();616263/** @brief Returns whether all needed values were read64* @return Whether all needed values were read65*/66bool hasReadAll() const;676869protected:70/// @name inherited from GenericSAXHandler71//@{7273/** @brief Called on the opening of a tag;74*75* @param[in] element ID of the currently opened element76* @param[in] attrs Attributes within the currently opened element77* @exception ProcessError If something fails78* @see GenericSAXHandler::myStartElement79*/80virtual void myStartElement(int element,81const SUMOSAXAttributes& attrs);82//@}838485private:86/// @brief Information whether the parameter was read87bool myFoundLocation;8889/// @brief scaling of input coordinates (not given in the location element)90double myScale;919293};949596