117 typedef std::map<long long int, PCOSMEdge*>
EdgeMap;
122 const std::string& fullType,
int index,
bool useName,
PCPolyContainer& toFill,
bool ignorePruning,
bool withAttributes);
126 const std::string& fullType,
int index,
bool useName,
PCPolyContainer& toFill,
bool ignorePruning,
bool withAttributes);
138 static double mergeClosest(
const std::map<long long int, PCOSMNode*>& nodes, std::vector<std::vector<long long int> >& snippets);
152 NodesHandler(std::map<long long int, PCOSMNode*>& toFill,
bool withAttributes,
224 std::set<long long int>& innerEdges,
309 EdgesHandler(
const std::map<long long int, PCOSMNode*>& osmNodes,
A storage for options typed value containers)
A class which extracts OSM-edges from a parsed OSM-file.
bool myWithAttributes
Whether all attributes shall be stored.
bool myKeep
whether the last edge (way) should be kept because it had a key from the inclusion list
EdgeMap & myEdgeMap
A map of built edges.
const RelationsMap & myAdditionalWays
additional ways which are reference by relations
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
void myEndElement(int element)
Called when a closing tag occurs.
~EdgesHandler()
Destructor.
PCOSMEdge * myCurrentEdge
The currently built edge.
EdgesHandler & operator=(const EdgesHandler &s)
Invalidated assignment operator.
const std::map< long long int, PCOSMNode * > & myOSMNodes
The previously parsed nodes.
std::vector< int > myParentElements
Current path in order to know to what occuring values belong.
MsgHandler & myErrorHandler
The handler to report errors to (will be the WarningsHandler if –ignore-errors was set)
EdgesHandler(const EdgesHandler &s)
Invalidated copy constructor.
A class which extracts OSM-nodes from a parsed OSM-file.
NodesHandler & operator=(const NodesHandler &s)
Invalidated assignment operator.
std::map< long long int, PCOSMNode * > & myToFill
The nodes container to fill.
NodesHandler(const NodesHandler &s)
Invalidated copy constructor.
long long int myLastNodeID
The id of the last parsed node.
bool myWithAttributes
Whether all attributes shall be stored.
void myEndElement(int element)
Called when a closing tag occurs.
std::vector< int > myParentElements
Current path in order to know to what occuring values belong.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
MsgHandler & myErrorHandler
The handler to report errors to (will be the WarningsHandler if –ignore-errors was set)
~NodesHandler()
Destructor.
A class which extracts relevant way-ids from relations in a parsed OSM-file.
std::set< long long int > & myInnerEdges
the loaded edges
Relations & myRelations
the loaded relations
std::vector< long long int > myCurrentWays
the ways within the current relation
std::vector< long long int > myParentElements
Current path in order to know to what occuring values belong.
PCOSMRelation * myCurrentRelation
The currently parsed relation.
void myEndElement(int element)
Called when a closing tag occurs.
RelationsHandler & operator=(const RelationsHandler &s)
Invalidated assignment operator.
RelationsHandler(const RelationsHandler &s)
Invalidated copy constructor.
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
RelationsMap & myAdditionalWays
additional ways which are reference by relations
MsgHandler & myErrorHandler
The handler to report errors to (will be the WarningsHandler if –ignore-errors was set)
bool myWithAttributes
Whether all attributes shall be stored.
~RelationsHandler()
Destructor.
bool myKeep
whether the last edge (way) should be kept because it had a key from the inclusion list
A reader of pois and polygons stored in OSM-format.
static int addPolygon(const PCOSMEdge *edge, const PositionVector &vec, const PCTypeMap::TypeDef &def, const std::string &fullType, int index, bool useName, PCPolyContainer &toFill, bool ignorePruning, bool withAttributes)
try add the polygon and return the next index on success
std::map< long long int, PCOSMEdge * > EdgeMap
static Position convertNodePosition(PCOSMNode *n)
retrieve cartesian coordinate for given node
static int addPOI(const PCOSMNode *node, const Position &pos, const PCTypeMap::TypeDef &def, const std::string &fullType, int index, bool useName, PCPolyContainer &toFill, bool ignorePruning, bool withAttributes)
try add the POI and return the next index on success
static double mergeClosest(const std::map< long long int, PCOSMNode * > &nodes, std::vector< std::vector< long long int > > &snippets)
static void loadIfSet(OptionsCont &oc, PCPolyContainer &toFill, PCTypeMap &tm)
Loads pois/polygons assumed to be stored as OSM-XML.
std::vector< PCOSMRelation * > Relations
static const std::set< std::string > MyKeysToInclude
std::map< long long int, PCOSMRelation * > RelationsMap
static std::set< std::string > initMyKeysToInclude()
A storage for loaded polygons and pois.
A storage for type mappings.
A point in 2D or 3D with translation and scaling methods.
Encapsulated SAX-Attributes.
SAX-handler base for SUMO-files.
An internal definition of a loaded edge.
bool myIsClosed
Information whether this area is closed.
long long int id
The edge's id.
std::map< std::string, std::string > myAttributes
Additional attributes.
std::vector< long long int > myCurrentNodes
The list of nodes this edge is made of.
std::string name
The edge's name (if any)
An internal representation of an OSM-node.
double lat
The latitude the node is located at.
double lon
The longitude the node is located at.
std::string name
The nodes name (if any)
long long int id
The node's id.
std::map< std::string, std::string > myAttributes
Additional attributes.
An internal definition of a loaded relation.
std::vector< long long int > myWays
The list of ways this relation is made of.
std::string name
The relation's name (if any)
bool keep
whether this relation is a valid polygon
std::map< std::string, std::string > myAttributes
Additional attributes.
long long int id
The relation's id.
A single definition of values that shall be used for a given type.