/****************************************************************************/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 PCLoaderVisum.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Thu, 02.11.200617///18// A reader of pois and polygons stored in VISUM-format19/****************************************************************************/20#pragma once21#include <config.h>2223#include <string>24#include "PCPolyContainer.h"25#include "PCTypeMap.h"262728// ===========================================================================29// class definitions30// ===========================================================================31class OptionsCont;323334// ===========================================================================35// class declarations36// ===========================================================================37/**38* @class PCLoaderVisum39* @brief A reader of pois and polygons stored in VISUM-format40*/41class PCLoaderVisum {42public:43/** @brief Loads pois/polygons assumed to be stored using VISUM-format44*45* If the option "visum-files" is set within the given options container,46* the files stored herein are parsed using "load", assuming this47* option contains file paths to files containing pois and polygons stored48* in VISUM ".net"-format.49*50* @param[in] oc The options container to get further options from51* @param[in] toFill The poly/pois container to add loaded polys/pois to52* @param[in] tm The type map to use for setting values of loaded polys/pois53* @exception ProcessError if something fails54*/55static void loadIfSet(OptionsCont& oc, PCPolyContainer& toFill,56PCTypeMap& tm);575859protected:60/** @brief Parses pois/polys stored within the given file61* @param[in] oc The options container to get further options from62* @param[in] toFill The poly/pois container to add loaded polys/pois to63* @param[in] tm The type map to use for setting values of loaded polys/pois64* @exception ProcessError if something fails65*/66static void load(const std::string& file, OptionsCont& oc, PCPolyContainer& toFill,67PCTypeMap& tm);686970/**71* @enum VISUM keys72* @brief Numbers representing VISUM keywords73*/74enum VISUM_KEY {75VISUM_SYS,76VISUM_LINKTYPE,77VISUM_NODE,78VISUM_DISTRICT,79VISUM_POINT,80VISUM_LINK,81VISUM_V0,82VISUM_TYPES,83VISUM_RANK,84VISUM_CAPACITY,85VISUM_XCOORD,86VISUM_YCOORD,87VISUM_FROMNODE,88VISUM_TONODE,89VISUM_TYPE,90VISUM_TYP,91VISUM_ID,92VISUM_CODE,93VISUM_DISTRICT_CONNECTION,94VISUM_SOURCE_DISTRICT,95VISUM_FROMNODENO,96VISUM_DIRECTION,97VISUM_SURFACEID,98VISUM_FACEID,99VISUM_FROMPOINTID,100VISUM_TOPOINTID,101VISUM_EDGE,102VISUM_VIANODENO,103VISUM_NUMLANES,104VISUM_TURN,105VISUM_INDEX,106VISUM_LINKPOLY,107VISUM_SURFACEITEM,108VISUM_FACEITEM,109VISUM_EDGEID,110VISUM_ORIGIN,111VISUM_DESTINATION,112// polyconvert keys added to avoid warnings113VISUM_CATID,114VISUM_EDGEITEM,115VISUM_POICATEGORY,116VISUM_NO // must be the last one117};118119/// Strings for the keywords120static StringBijection<VISUM_KEY>::Entry KEYS_DE[];121122/// @brief link directions123static StringBijection<VISUM_KEY> KEYS;124125static void loadLanguage(const std::string& file);126};127128129