1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
10 /// @file    NBEdgeCont.h
11 /// @author  Daniel Krajzewicz
12 /// @author  Jakob Erdmann
13 /// @author  Michael Behrisch
14 /// @date    Tue, 20 Nov 2001
15 /// @version $Id$
16 ///
17 // Storage for edges, including some functionality operating on multiple edges
18 /****************************************************************************/
19 #ifndef NBEdgeCont_h
20 #define NBEdgeCont_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <map>
29 #include <iostream>
30 #include <string>
31 #include <vector>
32 #include <set>
33 #include "NBCont.h"
34 #include <utils/common/SUMOVehicleClass.h>
35 #include <utils/common/UtilExceptions.h>
36 #include <utils/geom/PositionVector.h>
37 #include <utils/common/NamedRTree.h>
38 
39 
40 // ===========================================================================
41 // class declarations
42 // ===========================================================================
43 class OptionsCont;
44 class OutputDevice;
45 class NBNodeCont;
46 class NBTypeCont;
47 class NBEdge;
48 class NBNode;
49 class NBDistrictCont;
50 class NBTrafficLightLogicCont;
51 class NBPTStopCont;
52 
53 
54 // ===========================================================================
55 // class definitions
56 // ===========================================================================
57 /**
58  * @class NBEdgeCont
59  * @brief Storage for edges, including some functionality operating on multiple edges
60  */
61 class NBEdgeCont {
62 public:
63     /** @brief Constructor
64      * @param[in] tc The net builded; used to obtain types
65      */
66     NBEdgeCont(NBTypeCont& tc);
67 
68 
69     /// @brief Destructor
70     ~NBEdgeCont();
71 
72 
73     /** @brief Initialises the storage by applying given options
74      *
75      * Options, mainly steering the acceptance of edges, are parsed
76      *  and the according internal variables are set.
77      *
78      * @param[in] oc The options container to read options from
79      * @todo Recheck exceptions
80      */
81     void applyOptions(OptionsCont& oc);
82 
83 
84     /** @brief Deletes all edges */
85     void clear();
86 
87 
88 
89 
90     /// @name edge access methods
91     /// @{
92 
93     /** @brief Adds an edge to the dictionary
94      *
95      * First, it is determined whether the edge shall not be discarded due to any
96      *  reasons (being outside a boundary, or not in the optional list of edges to
97      *  import, etc.). If so, the edge is deleted and "true" is returned.
98      * "true" is also returned if the edge is accepted - no edge with the same
99      *  name exists within this container. If another edge with the same name
100      *  exists, false is returned.
101      *
102      * @param[in] edge The edge to add
103      * @param[in] ignorePrunning Whether this edge must not be prunned
104      * @return Whether the edge was valid (no edge with the same id is already known)
105      */
106     bool insert(NBEdge* edge, bool ignorePrunning = false);
107 
108 
109     /** @brief Returns the edge that has the given id
110      *
111      * If no edge that has the given id is known, 0 is returned.
112      *
113      * @param[in] id The id of the edge to retrieve
114      * @param[in] bool Whether extracted edges shall be retrieved as well
115      * @return The edge with the given id, 0 if no such edge exists
116      */
117     NBEdge* retrieve(const std::string& id, bool retrieveExtracted = false) const;
118 
119 
120     /** @brief Tries to retrieve an edge, even if it is splitted
121      *
122      * The edge given with the id should exist and is followed downstream or upstream,
123      *  depending on the parameter to the last edge still starting with the id.
124      *
125      * @param[in] id The id of the edge to retrieve
126      * @param[in] downstream search direction
127      * @return The searched edge
128      * @todo Recheck usage
129      */
130     NBEdge* retrievePossiblySplit(const std::string& id, bool downstream) const;
131 
132 
133     /** @brief Tries to retrieve an edge, even if it is splitted
134      *
135      * To describe which part of the edge shall be returned, the
136      *  id of a second edge, participating at the node and the information
137      *  whether to return the outgoing or the incoming is needed.
138      *
139      * @param[in] id The id of the edge to retrieve
140      * @param[in] hint An additional information which helps to retrieve the correct edge
141      * @param[in] incoming Whether the edge to find is an incoming edge at the node "hint" participates
142      * @return The searched edge
143      * @todo Recheck usage
144      */
145     NBEdge* retrievePossiblySplit(const std::string& id, const std::string& hint, bool incoming) const;
146 
147 
148     /** @brief Tries to retrieve an edge, even if it is splitted
149      *
150      * To describe which part of the edge shall be returned, a
151      *  position hint is supplied.
152      *
153      * @param[in] id The id of the edge to retrieve
154      * @param[in] pos An additional about the position of the basic edge's subpart
155      * @return The searched edge
156      * @todo Recheck usage
157      */
158     NBEdge* retrievePossiblySplit(const std::string& id, double pos) const;
159 
160 
161     /** @brief Removes the given edge from the container (deleting it)
162      *
163      * @param[in] dc The district container, in order to remove the edge from sources/sinks
164      * @param[in] edge The edge to remove
165      * @todo Recheck whether the district cont is needed - if districts are processed using an external tool
166      */
167     void erase(NBDistrictCont& dc, NBEdge* edge);
168 
169 
170     /** @brief Removes the given edge from the container like erase but does not
171      * delete it
172      *
173      * @param[in] dc The district container, in order to remove the edge from sources/sinks
174      * @param[in] edge The edge to remove
175      * @param[in] remember Whether to keep this edge for future reference
176      * @todo Recheck whether the district cont is needed - if districts are processed using an external tool
177      * @todo Recheck whether this is used at all and why
178      */
179     void extract(NBDistrictCont& dc, NBEdge* edge, bool remember = false);
180 
181 
182     /** @brief Returns the pointer to the begin of the stored edges
183      * @return The iterator to the beginning of stored edges
184      */
begin()185     std::map<std::string, NBEdge*>::const_iterator begin() const {
186         return myEdges.begin();
187     }
188 
189 
190     /** @brief Returns the pointer to the end of the stored edges
191      * @return The iterator to the end of stored edges
192      */
end()193     std::map<std::string, NBEdge*>::const_iterator end() const {
194         return myEdges.end();
195     }
196     /// @}
197 
198 
199 
200     /// @name explicit edge manipulation methods
201     /// @{
202 
203     /** @struct Split
204      * @brief A structure which describes changes of lane number or speed along the road
205      */
206     struct Split {
SplitSplit207         Split() : offset(0), offsetFactor(1) {}
208         /// @brief The lanes after this change
209         std::vector<int> lanes;
210         /// @brief The position of this change
211         double pos;
212         /// @brief The speed after this change
213         double speed;
214         /// @brief The new node that is created for this split
215         NBNode* node;
216         /// @brief The id for the edge before the split
217         std::string idBefore;
218         /// @brief The id for the edge after the split
219         std::string idAfter;
220         /// @brief the default node id
221         std::string nameID;
222         /// @brief lateral offset to edge geometry
223         double offset;
224         /// @brief direction in which to apply the offset (used by netgenerate for lefthand networks)
225         int offsetFactor;
226     };
227 
228     void processSplits(NBEdge* e, std::vector<Split> splits,
229                        NBNodeCont& nc, NBDistrictCont& dc, NBTrafficLightLogicCont& tlc);
230 
231 
232     /** @brief Splits the edge at the position nearest to the given node
233      *
234      * Uses "splitAt(NBDistrictCont &, NBEdge *, NBNode *, const std::string &, const std::string &, int , int)"
235      *  to perform the split; the edge names are built by appending "[0]" and "[1]",
236      *  respectively. Both edges will have the same number of lanes.
237      *
238      * @param[in] dc The district container, in order to remove/add the edge from/to sources/sinks
239      * @param[in] edge The edge to split
240      * @param[in] node The node to split the edge at
241      * @return Whether the edge could be split
242      * @exception ProcessError If connections between the edges can not be built
243      * @see NBEdge::splitAt(NBDistrictCont &, NBEdge *, NBNode *, const std::string &, const std::string &, int , int)
244      */
245     bool splitAt(NBDistrictCont& dc, NBEdge* edge, NBNode* node);
246 
247 
248     /** @brief Splits the edge at the position nearest to the given node using the given modifications
249      *
250      * Determines the position of the split by finding the nearest position on the
251      *  edge to the given node. If this position is too near to the edges begin/end,
252      *  false is returned.
253      *
254      * Otherwise, "splitAt(NBDistrictCont &, NBEdge *, double, NBNode *, const std::string &, const std::string &, int , int)"
255      *  is used to perform the split.
256      *
257      * @param[in] dc The district container, in order to remove/add the edge from/to sources/sinks
258      * @param[in] edge The edge to split
259      * @param[in] node The node to split the edge at
260      * @param[in] firstEdgeName The id the first part of the split edge shall have
261      * @param[in] secondEdgeName The id the second part of the split edge shall have
262      * @param[in] noLanesFirstEdge The number of lanes the second part of the split edge shall have
263      * @param[in] noLanesSecondEdge The number of lanes the second part of the split edge shall have
264      * @param[in] speed The speed for the edge after the split
265      * @param[in] changedLeft The number of lanes that is added or removed on the left side of the edge
266      *            (By default all added/removed lanes are assumed to be on the right when computing connections)
267      * @return Whether the edge could be split
268      * @exception ProcessError If connections between the edges can not be built
269      * @see NBEdge::splitAt(NBDistrictCont &, NBEdge *, double, NBNode *, const std::string &, const std::string &, int , int)
270      */
271     bool splitAt(NBDistrictCont& dc, NBEdge* edge, NBNode* node,
272                  const std::string& firstEdgeName, const std::string& secondEdgeName,
273                  int noLanesFirstEdge, int noLanesSecondEdge,
274                  const double speed = -1., const int changedLeft = 0);
275 
276 
277     /** @brief Splits the edge at the position nearest to the given node using the given modifications
278      *
279      * @param[in] dc The district container, in order to remove/add the edge from/to sources/sinks
280      * @param[in] edge The edge to split
281      * @param[in] node The node to split the edge at
282      * @param[in] firstEdgeName The id the first part of the split edge shall have
283      * @param[in] secondEdgeName The id the second part of the split edge shall have
284      * @param[in] noLanesFirstEdge The number of lanes the second part of the split edge shall have
285      * @param[in] noLanesSecondEdge The number of lanes the second part of the split edge shall have
286      * @param[in] speed The speed for the edge after the split
287      * @param[in] changedLeft The number of lanes that is added or removed on the left side of the edge
288      *            (By default all added/removed lanes are assumed to be on the right when computing connections)
289      * @return Whether the edge could be split
290      * @exception ProcessError If connections between the edges can not be built
291      */
292     bool splitAt(NBDistrictCont& dc, NBEdge* edge, double edgepos, NBNode* node,
293                  const std::string& firstEdgeName, const std::string& secondEdgeName,
294                  int noLanesFirstEdge, int noLanesSecondEdge,
295                  const double speed = -1., const int changedLeft = 0);
296     /// @}
297 
298 
299 
300     /// @name container access methods
301     /// @{
302 
303     /** @brief Returns the number of edges
304      * @return The number of edges stored in this container
305      */
size()306     int size() const {
307         return (int) myEdges.size();
308     }
309 
310 
311     /** @brief Returns all ids of known edges
312      * @return All ids of known edges
313      * @todo Recheck usage, probably, filling a given vector would be better...
314      */
315     std::vector<std::string> getAllNames() const;
316 
317 
318     /** @brief Returns the number of edge splits
319      * @return How often an edge was split
320      */
getNoEdgeSplits()321     int getNoEdgeSplits() const {
322         return myEdgesSplit;
323     }
324     /// @}
325 
326 
327 
328     /// @name Adapting the input
329     /// @{
330 
331     /** @brief Removes unwished edges (not in keep-edges)
332      * @param[in, opt. changed] dc The district container needed to remove edges
333      * @todo Recheck usage; check whether keep-edges.postload is really useful
334      */
335     void removeUnwishedEdges(NBDistrictCont& dc);
336 
337 
338     /** @brief Splits edges into multiple if they have a complex geometry
339      *
340      * Calls "NBEdge::splitGeometry" for all edges within the container which
341      *  have more than three positions in their geometry.
342      *
343      * @param[in] nc The node container needed to build (geometry) nodes
344      * @see NBEdge::splitGeometry
345      */
346     void splitGeometry(NBNodeCont& nc);
347 
348 
349     /** @brief
350      * @param[in] nc The node container needed to build (geometry) nodes
351      * @see NBEdge::reduceGeometry
352      */
353     void reduceGeometries(const double minDist);
354 
355 
356     /** @brief
357      * @param[in] maxAngle The maximum geometry angle allowed
358      * @param[in] minRadius The minimum turning radius allowed at the start and end
359      * @param[in] fix Whether to prune geometry points to avoid sharp turns at start and end
360      * @see NBEdge::checkGeometry
361      */
362     void checkGeometries(const double maxAngle, const double minRadius, bool fix);
363     /// @}
364 
365 
366 
367     /// @name processing methods
368     /// @{
369 
370     /** @brief Sorts all lanes of all edges within the container by their direction
371      *
372      * Calls "NBEdge::sortOutgoingLanesConnections" for all edges within the container.
373      *
374      * @todo Recheck whether a visitor-pattern should be used herefor
375      * @see NBEdge::sortOutgoingLanesConnections
376      */
377     void sortOutgoingLanesConnections();
378 
379 
380     /** @brief Computes for each edge the approached edges
381      *
382      * Calls "NBEdge::computeEdge2Edges" for all edges within the container.
383      *
384      * @param[in] noLeftMovers Whether left-moving connections shall be omitted
385      * @todo Recheck whether a visitor-pattern should be used herefor
386      * @see NBEdge::computeEdge2Edges
387      */
388     void computeEdge2Edges(bool noLeftMovers);
389 
390 
391     /** @brief Computes for each edge which lanes approach the next edges
392      *
393      * Calls "NBEdge::computeLanes2Edges" for all edges within the container.
394      *
395      * @todo Recheck whether a visitor-pattern should be used herefor
396      * @see NBEdge::computeLanes2Edges
397      */
398     void computeLanes2Edges();
399 
400 
401     /** @brief Rechecks whether all lanes have a successor for each of the stored edges
402      *
403      * Calls "NBEdge::recheckLanes" for all edges within the container.
404      *
405      * @todo Recheck whether a visitor-pattern should be used herefor
406      * @see NBEdge::recheckLanes
407      */
408     void recheckLanes();
409 
410 
411     /** @brief Appends turnarounds to all edges stored in the container
412      *
413      * Calls "NBEdge::appendTurnaround" for all edges within the container.
414      *
415      * @param[in] noTLSControlled Whether the turnaround shall not be connected if the edge is controlled by a tls
416      * @param[in] exceptDeadends Whether the turnaround shall only be built at deadends
417      * @todo Recheck whether a visitor-pattern should be used herefor
418      * @see NBEdge::appendTurnaround
419      */
420     void appendTurnarounds(bool noTLSControlled, bool onlyDeadends, bool noGeometryLike);
421 
422 
423     /** @brief Appends turnarounds to all edges stored in the container
424      * Calls "NBEdge::appendTurnaround" for edges with the given ids
425      * @param[in] ids The list of ids for which to append a turnaround
426      * @param[in] noTLSControlled Whether the turnaround shall not be connected if the edge is controlled by a tls
427      * @see NBEdge::appendTurnaround
428      */
429     void appendTurnarounds(const std::set<std::string>& ids, bool noTLSControlled);
430 
431     /** @brief Appends turnarounds to all bidiRail edges with stops
432      */
433     void appendRailwayTurnarounds(const NBPTStopCont& sc);
434 
435 
436     /** @brief Computes the shapes of all edges stored in the container
437      *
438      * Calls "NBEdge::computeEdgeShape" for all edges within the container.
439      *
440      * @todo Recheck whether a visitor-pattern should be used herefor
441      * @todo Recheck usage
442      * @see NBEdge::computeEdgeShape
443      */
444     void computeEdgeShapes(double smoothElevationThreshold = -1);
445 
446 
447     /** @brief Computes the shapes of all lanes of all edges stored in the container
448      *
449      * Calls "NBEdge::computeLaneShapes" for all edges within the container.
450      *
451      * @todo Recheck whether a visitor-pattern should be used herefor
452      * @todo Recheck usage
453      * @see NBEdge::computeLaneShapes
454      */
455     void computeLaneShapes();
456 
457 
458     /** @brief Clears information about controlling traffic lights for all connenections of all edges
459      */
460     void clearControllingTLInformation() const;
461 
462 
463     /** @brief Joins the given edges because they connect the same nodes
464      *
465      * @param[in] dc The district container needed to remove edges
466      * @param[in] tlc The tls container needed to remove edges
467      * @param[in] edges The edges to join
468      * @todo Recheck and describe usage
469      */
470     void joinSameNodeConnectingEdges(NBDistrictCont& dc,
471                                      NBTrafficLightLogicCont& tlc, EdgeVector edges);
472 
473 
474     /** @brief Sets opposite lane information for geometrically close edges
475      */
476     void guessOpposites();
477 
478 
479     /** @brief Rechecks whether the lane spread is proper
480      *
481      * @todo Recheck usage; check whether this is really needed and whether it works at all
482      */
483     void recheckLaneSpread();
484 
485     /// @}
486 
487     /// @brief Returns the edge with negated id if it exists
488     NBEdge* getOppositeByID(const std::string& edgeID) const;
489 
490     /// @brief Returns the edge with id if it exists
491     NBEdge* getByID(const std::string& edgeID) const;
492 
493     /** @brief Determines which edges belong to roundabouts and increases their priority
494      * @param[out] marked Edges which belong to a roundabout are stored here
495      * @return The number of guessed roundabouts
496      */
497     int guessRoundabouts();
498 
499 
500     /** @brief Returns whether the edge with the id was ignored during parsing
501      * @return Whether the edge with the id was ignored during parsing
502      */
wasIgnored(std::string id)503     bool wasIgnored(std::string id) const {
504         return myIgnoredEdges.count(id) != 0;
505     }
506 
507     /// @brief mark the given edge id as ignored
ignore(std::string id)508     void ignore(std::string id) {
509         myIgnoredEdges.insert(id);
510     }
511 
512     /** @brief Returns whether the edge with the id was deleted explicitly
513      */
wasRemoved(std::string id)514     bool wasRemoved(std::string id) const {
515         return myExtractedEdges.count(id) != 0;
516     }
517 
518     /** @brief Renames the edge. Throws exception if newID already exists
519      */
520     void rename(NBEdge* edge, const std::string& newID);
521 
522 
523 
524     /// @name Connections handling
525     /// @{
526 
527     /** @brief Adds a connection which could not be set during loading
528      * @param[in] from The id of the edge the connection starts at
529      * @param[in] fromLane The number of the lane the connection starts at
530      * @param[in] to The id of the edge the connection ends at
531      * @param[in] toLane The number of the lane the connection ends at
532      * @param[in] mayDefinitelyPass Whether the connection may be passed without braking
533      * @param[in] keepClear Whether the connection must check to keep the junction clear
534      * @param[in] contPos Custom position for internal junction
535      * @param[in] visibility Custom foe visiblity connection
536      * @param[in] speed Custom speed
537      * @param[in] customShape Custom shape
538      * @param[in] warnOnly Whether a failure to set this connection should only result in a warning
539      */
540     void addPostProcessConnection(const std::string& from, int fromLane, const std::string& to, int toLane, bool mayDefinitelyPass,
541                                   bool keepClear, double contPos, double visibility, double speed,
542                                   const PositionVector& customShape,
543                                   bool uncontrolled,
544                                   bool warnOnly);
545 
546     bool hasPostProcessConnection(const std::string& from, const std::string& to = "");
547 
548 
549     /** @brief Try to set any stored connections
550      */
551     void recheckPostProcessConnections();
552     /// @}
553 
554     /// @brief assigns street signs to edges based on toNode types
555     void generateStreetSigns();
556 
557     /// @brief add sidwalks to edges within the given limits or permissions and return the number of edges affected
558     int guessSidewalks(double width, double minSpeed, double maxSpeed, bool fromPermissions);
559 
560 
561     /** @brief Returns the determined roundabouts
562      * @return The list of roundabout edges
563      */
564     const std::set<EdgeSet> getRoundabouts() const;
565 
566     /// @brief add user specified roundabout
567     void addRoundabout(const EdgeSet& roundabout);
568 
569     /// @brief remove roundabout that contains the given node
570     void removeRoundabout(const NBNode* node);
571 
572     /// @brief mark edge priorities and prohibit turn-arounds for all roundabout edges
573     void markRoundabouts();
574 
575     /// @brief fix roundabout information after splitting an edge
576     void patchRoundabouts(NBEdge* orig, NBEdge* part1, NBEdge* part2, std::set<EdgeSet>& roundabouts);
577 
578     /// @brief Returns true if this edge matches one of the removal criteria
579     bool ignoreFilterMatch(NBEdge* edge);
580 
581     /// @brief remap node IDs accoring to options --numerical-ids and --reserved-ids
582     int remapIDs(bool numericaIDs, bool reservedIDs, const std::string& prefix, NBPTStopCont& sc);
583 
584     /// @brief check whether edges overlap
585     void checkOverlap(double threshold, double zThreshold) const;
586 
587     /// @brief check whether edges are to steep
588     void checkGrade(double threshold) const;
589 
590 
591     /** @brief Returns the edges which have been built by splitting the edge of the given id
592      *
593      * @param[in] id The id of the original edge
594      * @return List of all edges which have been built by splitting the original edge
595      * @todo Recheck usage
596      */
597     EdgeVector getGeneratedFrom(const std::string& id) const;
598 
599     /// @brief return all edges
600     EdgeVector getAllEdges() const;
601 
602 private:
603     /// @brief compute the form factor for a loop of edges
604     static double formFactor(const EdgeVector& loopEdges);
605 
606 private:
607     /// @brief The network builder; used to obtain type information
608     NBTypeCont& myTypeCont;
609 
610     /** @struct PostProcessConnection
611      * @brief A structure representing a connection between two lanes
612      */
613     struct PostProcessConnection {
614     public:
615         /** @brief Constructor
616          * @param[in] from The id of the edge the connection starts at
617          * @param[in] fromLane The number of the lane the connection starts at
618          * @param[in] to The id of the edge the connection ends at
619          * @param[in] toLane The number of the lane the connection ends at
620          * @param[in] mayDefinitelyPass Whether the connection may be passed without braking
621          */
PostProcessConnectionPostProcessConnection622         PostProcessConnection(const std::string& from_, int fromLane_, const std::string& to_, int toLane_,
623                               bool mayDefinitelyPass_, bool keepClear_, double contPos_, double visibility_, double speed_,
624                               const PositionVector& customShape_,
625                               bool uncontrolled_,
626                               bool warnOnly_) :
627             from(from_), fromLane(fromLane_), to(to_), toLane(toLane_), mayDefinitelyPass(mayDefinitelyPass_), keepClear(keepClear_), contPos(contPos_),
628             visibility(visibility_),
629             speed(speed_),
630             customShape(customShape_),
631             uncontrolled(uncontrolled_),
632             warnOnly(warnOnly_) {
633         }
634         /// @brief The id of the edge the connection starts at
635         std::string from;
636         /// @brief The number of the lane the connection starts at
637         int fromLane;
638         /// @brief The id of the edge the connection ends at
639         std::string to;
640         /// @brief The number of the lane the connection ends at
641         int toLane;
642         /// @brief Whether the connection may be passed without braking
643         bool mayDefinitelyPass;
644         /// @brief Whether the connection may be passed without braking
645         bool keepClear;
646         /// @brief custom position for internal junction on this connection
647         double contPos;
648         /// @brief custom foe visiblity for connection
649         double visibility;
650         /// @brief custom speed for connection
651         double speed;
652         /// @brief custom shape for connection
653         PositionVector customShape;
654         /// @brief whether this connection shall not be controlled by a traffic light
655         bool uncontrolled;
656         /// @brief whether a failure to set this connection is a warning or an error
657         bool warnOnly;
658     };
659 
660     /// @brief The list of connections to recheck
661     std::map<std::string, std::vector<PostProcessConnection> > myConnections;
662 
663 
664     /// @brief The type of the dictionary where an edge may be found by its id
665     typedef std::map<std::string, NBEdge*> EdgeCont;
666 
667     /// @brief The instance of the dictionary (id->edge)
668     EdgeCont myEdges;
669 
670     /// @brief The extracted nodes which are kept for reference
671     EdgeCont myExtractedEdges;
672 
673     /// @brief The ids of ignored edges
674     std::set<std::string> myIgnoredEdges;
675 
676     /// @brief the number of splits of edges during the building
677     int myEdgesSplit;
678 
679     /// @name Settings for accepting/dismissing edges
680     /// @{
681 
682     /// @brief The minimum speed an edge may have in order to be kept (default: -1)
683     double myEdgesMinSpeed;
684 
685     /// @brief Whether edges shall be joined first, then removed
686     bool myRemoveEdgesAfterJoining;
687 
688     /// @brief Set of ids of edges which shall explicitly be kept
689     std::set<std::string> myEdges2Keep;
690 
691     /// @brief Set of ids of edges which shall explicitly be removed
692     std::set<std::string> myEdges2Remove;
693 
694     /// @brief Set of vehicle types which must be allowed on edges in order to keep them
695     SVCPermissions myVehicleClasses2Keep;
696 
697     /// @brief Set of vehicle types which need not be supported (edges which allow ONLY these are removed)
698     SVCPermissions myVehicleClasses2Remove;
699 
700     /// @brief Set of edges types which shall be kept
701     std::set<std::string> myTypes2Keep;
702 
703     /// @brief Set of edges types which shall be removed
704     std::set<std::string> myTypes2Remove;
705 
706     /// @brief Boundary within which an edge must be located in order to be kept
707     PositionVector myPruningBoundary;
708 
709     /// @brief whether a geo transform has been applied to the pruning boundary
710     bool myNeedGeoTransformedPruningBoundary;
711     /// @}
712 
713     /// @brief Edges marked as belonging to a roundabout by the user (each EdgeVector is a roundabout)
714     std::set<EdgeSet> myRoundabouts;
715     /// @brief Edges marked as belonging to a roundabout after guessing
716     std::set<EdgeSet> myGuessedRoundabouts;
717 
718     /** @class split_sorter
719      * @brief Sorts splits by their position (increasing)
720      */
721     class split_sorter {
722     public:
723         /// @brief Constructor
split_sorter()724         explicit split_sorter() { }
725 
726         /// @brief Comparing operator
operator()727         int operator()(const Split& e1, const Split& e2) const {
728             return e1.pos < e2.pos;
729         }
730     };
731 
732 
733 private:
734     /// @brief invalidated copy constructor
735     NBEdgeCont(const NBEdgeCont& s);
736 
737     /// @brief invalidated assignment operator
738     NBEdgeCont& operator=(const NBEdgeCont& s);
739 
740 };
741 
742 
743 #endif
744 
745 /****************************************************************************/
746 
747