33 std::string name,
SVCPermissions svcPermissions,
double parkingLength) :
37 myOrigEdgeId(origEdgeId),
38 myPTStopLength(length),
40 myParkingLength(parkingLength),
41 myPermissions(svcPermissions),
45 myIsLoose(origEdgeId ==
""),
46 myIsMultipleStopPositions(false) {
134 platformCand.reshiftPosition(offsetX, offsetY);
151 const std::vector<NBPTPlatform>&
188 const std::map<std::string, std::string>&
213 if (edge !=
nullptr) {
216 for (
const auto& it : edge->
getLanes()) {
257 myAccesses.push_back(std::make_tuple(laneID, offset, length));
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_ATTR_PARKING_LENGTH
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Storage for edges, including some functionality operating on multiple edges.
NBEdge * getByID(const std::string &edgeID) const
Returns the edge with id if it exists.
The representation of a single edge during network building.
double getLength() const
Returns the computed length of the edge.
double getLoadedLength() const
Returns the length was set explicitly or the computed length if it wasn't set.
const std::string & getID() const
const std::vector< NBEdge::Lane > & getLanes() const
Returns the lane definitions.
std::string getLaneID(int lane) const
get lane ID
const PositionVector & getLaneShape(int i) const
Returns the shape of the nth lane.
bool myIsMultipleStopPositions
std::map< std::string, std::string > myAdditionalEdgeCandidates
void registerAdditionalEdge(std::string wayId, std::string edgeId)
const SVCPermissions myPermissions
bool findLaneAndComputeBusStopExtent(const NBEdgeCont &ec)
void addPlatformCand(NBPTPlatform platform)
void clearAccess()
remove all access definitions
std::vector< NBPTPlatform > myPlatformCands
std::vector< std::string > myLines
list of public transport lines (for displaying)
bool setEdgeId(std::string edgeId, const NBEdgeCont &ec)
const std::string getEdgeId() const
void computeExtent(double center, double d)
std::string getID() const
NBPTStop(std::string ptStopId, Position position, std::string edgeId, std::string origEdgeId, double length, std::string name, SVCPermissions svcPermissions, double parkingLength=0)
Constructor.
void mirrorX()
mirror coordinates along the x-axis
bool getIsMultipleStopPositions() const
void addAccess(std::string laneID, double offset, double length)
void write(OutputDevice &device)
const std::vector< NBPTPlatform > & getPlatformCands()
std::vector< std::tuple< std::string, double, double > > myAccesses
laneId, lanePos, accessLength
void setMyOrigEdgeId(const std::string &myOrigEdgeId)
void addLine(const std::string &line)
register line that services this stop (for displaying)
void reshiftPosition(const double offsetX, const double offsetY)
void setMyPTStopLength(double myPTStopLength)
SVCPermissions getPermissions() const
const std::map< std::string, std::string > & getMyAdditionalEdgeCandidates() const
void setIsMultipleStopPositions(bool multipleStopPositions)
const double myParkingLength
void setMyPTStopId(std::string id)
const Position & getPosition() const
const std::string getOrigEdgeId() const
const std::string getName() const
Static storage of an output device and its base (abstract) implementation.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
A point in 2D or 3D with translation and scaling methods.
void add(const Position &pos)
Adds the given position to this one.
void mul(double val)
Multiplies both positions with the given value.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID
static std::string escapeXML(const std::string &orig, const bool maskDoubleHyphen=false)
Replaces the standard escapes by their XML entities.