62 if (!oc.
isSet(
"xml-files")) {
68 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
70 throw ProcessError(
"Could not open xml-file '" + *file +
"'.");
static RGBColor parseColor(std::string coldef)
Parses a color information.
PCLoaderXML(PCPolyContainer &toFill, PCTypeMap &tm, OptionsCont &oc)
Constructor.
A single definition of values that shall be used for a given type.
A reader for polygons and pois stored in XML-format.
bool isInStringVector(const std::string &optionName, const std::string &itemName)
Returns the named option is a list of string values containing the specified item.
void setDefaults(const std::string &prefix, const RGBColor &color, const double layer, const bool fill=false)
set default values
static bool isReadable(std::string path)
Checks whether the given file is readable.
PCTypeMap & myTypeMap
The type map to use.
OptionsCont & myOptions
Settings to use.
double layer
The layer to use.
begin/end of the description of a Point of interest
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
bool discard
Information whether polygons of this type shall be discarded.
A storage for loaded polygons and pois.
RGBColor color
The color to use.
The XML-Handler for network loading.
Position getLanePos(const std::string &poiID, const std::string &laneID, double lanePos, double lanePosLat)
get position for a given laneID
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
A storage for type mappings.
const TypeDef & get(const std::string &id)
Returns a type definition.
Encapsulated SAX-Attributes.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
A point in 2D or 3D with translation and scaling methods.
bool has(const std::string &id)
Returns the information whether the named type is known.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void addPOI(const SUMOSAXAttributes &attrs, const bool ignorePruning, const bool useProcessing)
adds a POI
std::vector< std::string > getStringVector(const std::string &name) const
Returns the list of string-vector-value of the named option (only for Option_String) ...
#define PROGRESS_BEGIN_MESSAGE(msg)
~PCLoaderXML()
Destructor.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
void addPoly(const SUMOSAXAttributes &attrs, const bool ignorePruning, const bool useProcessing)
adds a polygon
virtual void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
std::string prefix
The prefix to use.
A storage for options typed value containers)
ShapeContainer & myShapeContainer
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as XML.
#define PROGRESS_DONE_MESSAGE()
bool allowFill
Information whether polygons of this type can be filled.
static const Position INVALID
used to indicate that a position is valid
begin/end of the description of a polygon