106 const
double GNENet::Z_INITIALIZED = 1;
116 myNetBuilder(netBuilder),
117 myEdgeIDSupplier("gneE", netBuilder->getEdgeCont().getAllNames()),
118 myJunctionIDSupplier("gneJ", netBuilder->getNodeCont().getAllNames()),
119 myNeedRecompute(true),
121 myAdditionalsSaved(true),
123 myTLSProgramsSaved(true),
124 myAllowUndoShapes(true) {
129 initJunctionsAndEdges();
132 if (myZBoundary.ymin() != Z_INITIALIZED) {
133 myZBoundary.add(0, 0);
137 for (
auto i : listOfTags) {
138 myAttributeCarriers.additionals.insert(std::make_pair(i, std::map<std::string, GNEAdditional*>()));
143 myAttributeCarriers.additionals.at(defaultVehicleType->
getTag()).insert(std::make_pair(defaultVehicleType->
getID(), defaultVehicleType));
144 defaultVehicleType->
incRef(
"GNENet::DEFAULT_VEHTYPE");
159 it.second->
decRef(
"GNENet::~GNENet");
161 WRITE_DEBUG(
"Deleting unreferenced " +
toString(it.second->getTag()) +
" '" + it.second->getID() +
"' in GNENet destructor");
166 it.second->decRef(
"GNENet::~GNENet");
168 WRITE_DEBUG(
"Deleting unreferenced " +
toString(it.second->getTag()) +
" '" + it.second->getID() +
"' in GNENet destructor");
173 for (
auto j : it.second) {
177 WRITE_DEBUG(
"Deleting unreferenced " +
toString(j.second->getTag()) +
" '" + j.second->getID() +
"' in GNENet destructor");
182 WRITE_DEBUG(
"Deleting net builder in GNENet destructor");
221 const std::string& imgFile,
bool relativePath,
const PositionVector& shape,
bool geo,
bool fill,
bool ) {
225 GNEPoly* poly =
new GNEPoly(
this,
id, type, shape, geo, fill, color, layer, angle, imgFile, relativePath,
false,
false);
233 poly->
incRef(
"addPolygon");
244 const std::string& lane,
double posOverLane,
double posLat,
double layer,
double angle,
245 const std::string& imgFile,
bool relativePath,
double width,
double height,
bool ) {
251 GNEPOI* poi =
new GNEPOI(
this,
id, type, color, pos, geo, layer, angle, imgFile, relativePath, width, height,
false);
264 throw ProcessError(
"Error adding GNEPOI into shapeContainer");
269 GNEPOI* poi =
new GNEPOI(
this,
id, type, color, layer, angle, imgFile, relativePath, retrievedLane, posOverLane, posLat, width, height,
false);
282 throw ProcessError(
"Error adding GNEPOI over lane into shapeContainer");
329 const std::string& suggestedName,
331 bool allowDuplicateGeom,
332 bool recomputeConnections) {
335 for (EdgeVector::const_iterator it = outgoing.begin(); it != outgoing.end(); it++) {
336 if ((*it)->getToNode() == dest->
getNBNode() && (*it)->getGeometry().size() == 2) {
337 if (!allowDuplicateGeom) {
344 if (suggestedName !=
"" && !
retrieveEdge(suggestedName,
false)) {
355 edge =
new GNEEdge(*nbe,
this, wasSplit);
359 double defaultSpeed = oc.
getFloat(
"default.speed");
360 std::string defaultType =
"";
361 int defaultNrLanes = oc.
getInt(
"default.lanenumber");
362 int defaultPriority = oc.
getInt(
"default.priority");
366 defaultType, defaultSpeed,
367 defaultNrLanes, defaultPriority,
370 edge =
new GNEEdge(*nbe,
this, wasSplit);
374 if (recomputeConnections) {
398 std::vector<GNECrossing*> crossingsToRemove;
400 for (
auto i : junctionNeighbours) {
402 for (
auto j : i->getGNECrossings()) {
405 crossingsToRemove.push_back(j);
411 for (
auto i : crossingsToRemove) {
417 for (
auto it : incident) {
442 i->removeLaneOfAdditionalParents(undoList,
false);
443 while (i->getAdditionalChilds().size() > 0) {
449 std::vector<GNEShape*> copyOfLaneShapes = i->getShapeChilds();
450 for (
auto j : copyOfLaneShapes) {
458 if (recomputeConnections) {
492 std::vector<GNEAdditional*> copyOfLaneAdditionals = i->getAdditionalChilds();
493 for (
auto j : copyOfLaneAdditionals) {
499 std::vector<GNEShape*> copyOfLaneShapes = i->getShapeChilds();
500 for (
auto j : copyOfLaneShapes) {
515 for (
auto con : connections) {
532 deleteEdge(edge, undoList, recomputeConnections);
546 if (recomputeConnections) {
555 undoList->add(
new GNEChange_Lane(edge, lane, laneAttrs,
false, recomputeConnections),
true);
580 undoList->
p_begin(
"delete crossing");
610 undoList->add(
new GNEChange_Lane(edge, newLane, laneAttrs,
true, recomputeConnections),
true);
618 bool addRestriction =
true;
624 addRestriction =
false;
633 if (addRestriction) {
650 if (i->isRestricted(vclass)) {
655 if (index >= (
int)edge.
getLanes().size()) {
669 if (i->isRestricted(vclass)) {
682 if (newJunction == 0) {
688 std::pair<PositionVector, PositionVector> newGeoms = oldGeom.
splitAt(linePos);
694 const std::string::size_type sep_index = baseName.rfind(
'.');
695 if (sep_index != std::string::npos) {
696 std::string posString = baseName.substr(sep_index + 1);
698 posBase = GNEAttributeCarrier::parse<int>(posString.c_str());
699 baseName = baseName.substr(0, sep_index);
707 undoList, baseName +
toString(posBase + (
int)linePos),
true,
false,
false);
713 newGeoms.first.pop_back();
714 newGeoms.first.erase(newGeoms.first.begin());
719 newGeoms.second.pop_back();
720 newGeoms.second.erase(newGeoms.second.begin());
723 for (
int i = 0; i < (int)edge->
getLanes().size(); ++i) {
728 if (crossing->checkEdgeBelong(edge)) {
730 for (
NBEdge* nbEdge : crossing->getNBCrossing()->edges) {
732 newNBEdges.push_back(secondPart->
getNBEdge());
734 newNBEdges.push_back(nbEdge);
749 for (
auto it : edges) {
750 newJunction =
splitEdge(it, pos, undoList, newJunction);
761 assert(reversed != 0);
776 assert(reversed != 0);
790 reversed =
createEdge(src, dest, edge, undoList,
"-" + edge->
getID(),
false,
true);
791 assert(reversed != 0);
811 for (
NBEdge* edge : incoming) {
823 for (
NBEdge* edge : outgoing) {
843 if (i.second->getPositionInView() == pos) {
856 std::string shapeSaved = (
myShapesSaved ?
"saved" :
"unsaved");
857 WRITE_DEBUG(
"Current saving Status: net unsaved, additionals " + additionalsSaved +
", shapes " + shapeSaved);
905 }
else if (failHard) {
920 }
else if (failHard) {
931 assert((from !=
nullptr) && (to !=
nullptr));
934 if ((i.second->getGNEJunctionSource() == from) && (i.second->getGNEJunctionDestiny() == to)) {
951 }
else if (failHard) {
964 }
else if (failHard) {
978 for (
auto j : i.second->getGNEConnections()) {
979 if (j->getID() == id) {
993 std::vector<GNEConnection*>
995 std::vector<GNEConnection*> result;
999 for (
auto j : i.second->getGNEConnections()) {
1000 if (!onlySelected || j->isAttributeCarrierSelected()) {
1001 result.push_back(j);
1014 for (
auto j : i.second->getGNECrossings()) {
1015 if (j->getID() == id) {
1029 std::vector<GNECrossing*>
1031 std::vector<GNECrossing*> result;
1035 for (
auto j : i.second->getGNECrossings()) {
1036 if (!onlySelected || j->isAttributeCarrierSelected()) {
1037 result.push_back(j);
1045 std::vector<GNEEdge*>
1047 std::vector<GNEEdge*> result;
1050 if (!onlySelected || i.second->isAttributeCarrierSelected()) {
1051 result.push_back(i.second);
1058 std::vector<GNELane*>
1060 std::vector<GNELane*> result;
1063 for (
auto j : i.second->getLanes()) {
1064 if (!onlySelected || j->isAttributeCarrierSelected()) {
1065 result.push_back(j);
1081 if (it->getID() == id) {
1086 if (lane ==
nullptr) {
1098 }
else if (failHard) {
1106 std::vector<GNEJunction*>
1108 std::vector<GNEJunction*> result;
1111 if (!onlySelected || i.second->isAttributeCarrierSelected()) {
1112 result.push_back(i.second);
1119 std::vector<GNEShape*>
1121 std::vector<GNEShape*> result;
1128 result.push_back(shape);
1135 if (poi && (poi->
getTag() == shapeTag)) {
1138 result.push_back(poi);
1147 std::vector<GNEShape*>
1149 std::vector<GNEShape*> result;
1154 result.push_back(poly);
1157 for (
const auto& it :
getPOIs()) {
1160 result.push_back(poi);
1185 if (
object !=
nullptr) {
1190 if (ac ==
nullptr) {
1191 throw ProcessError(
"GUIGlObject does not match the declared type");
1195 }
else if (failHard) {
1196 throw ProcessError(
"Attempted to retrieve non-existant GUIGlObject");
1203 std::vector<GNEAttributeCarrier*>
1205 std::vector<GNEAttributeCarrier*> result;
1209 result.push_back(i.second);
1210 for (
auto j : i.second->getGNECrossings()) {
1211 result.push_back(j);
1215 result.push_back(i.second);
1216 for (
auto j : i.second->getLanes()) {
1217 result.push_back(j);
1219 for (
auto j : i.second->getGNEConnections()) {
1220 result.push_back(j);
1224 for (
auto j : i.second) {
1225 result.push_back(j.second);
1229 result.push_back(dynamic_cast<GNEPoly*>(i.second));
1232 result.push_back(dynamic_cast<GNEPOI*>(i.second));
1237 result.push_back(i.second);
1244 result.push_back(i.second);
1249 result.push_back(i.second);
1254 for (
auto j : i.second->getLanes()) {
1255 result.push_back(j);
1261 for (
auto j : i.second->getGNEConnections()) {
1262 result.push_back(j);
1268 for (
auto j : i.second->getGNECrossings()) {
1269 result.push_back(j);
1275 result.push_back(dynamic_cast<GNEPoly*>(i.second));
1281 result.push_back(dynamic_cast<GNEPOI*>(i.second));
1297 if (volatileOptions) {
1298 window->
setStatusBarText(
"Forced computing junctions with volatile options ...");
1306 if (volatileOptions) {
1313 if (volatileOptions) {
1324 if (additionalPath !=
"") {
1327 for (
auto i : listOfTags) {
1334 defaultVehicleType->
incRef(
"GNENet::DEFAULT_VEHTYPE");
1349 if (shapePath !=
"") {
1359 window->getApp()->endWaitCursor();
1373 for (
auto it : tlsDefs) {
1374 it->setParticipantsInformation();
1375 it->setTLControllingInformation();
1392 if (n.second->getGNECrossings().size() > 0) {
1415 if (selectedJunctions.size() < 2) {
1420 std::set<NBNode*, ComparatorIdLess> cluster;
1421 for (
auto it : selectedJunctions) {
1422 cluster.insert(it->getNBNode());
1423 const EdgeVector& incoming = it->getNBNode()->getIncomingEdges();
1424 allIncoming.insert(allIncoming.end(), incoming.begin(), incoming.end());
1425 const EdgeVector& outgoing = it->getNBNode()->getOutgoingEdges();
1426 allOutgoing.insert(allOutgoing.end(), outgoing.begin(), outgoing.end());
1432 std::string
id =
"cluster";
1441 if ((i.second->getPositionInView() == pos) && (cluster.find(i.second->getNBNode()) == cluster.end())) {
1443 WRITE_DEBUG(
"Opening FXMessageBox 'Join non-selected junction'");
1445 FXuint answer = FXMessageBox::question(
getApp(), MBOX_YES_NO,
1452 WRITE_DEBUG(
"Closed FXMessageBox 'Join non-selected junction' with 'No'");
1453 }
else if (answer == 4) {
1454 WRITE_DEBUG(
"Closed FXMessageBox 'Join non-selected junction' with 'ESC'");
1459 WRITE_DEBUG(
"Closed FXMessageBox 'Join non-selected junction' with 'Yes'");
1469 pos.
setx(pos.
x() + 0.1);
1470 pos.
sety(pos.
y() + 0.1);
1488 std::vector<NBNode::Crossing> oldCrossings;
1489 for (
auto i : selectedJunctions) {
1490 while (i->getGNECrossings().size() > 0) {
1491 GNECrossing* crossing = i->getGNECrossings().front();
1498 for (
auto it : selectedJunctions) {
1499 it->setLogicValid(
false, undoList);
1502 for (
auto it : allIncoming) {
1507 for (
auto it : allOutgoing) {
1512 edgesWithin.insert(it);
1520 for (
auto nbc : oldCrossings) {
1522 for (
NBEdge* e : nbc.edges) {
1523 if (edgesWithin.count(e) != 0) {
1531 nbc.customTLIndex, nbc.customTLIndex2, nbc.customShape,
1532 false,
true),
true);
1537 for (
auto it : selectedJunctions) {
1544 if (pos != oldPos) {
1555 std::vector<GNECrossing*> myNetCrossings;
1557 myNetCrossings.reserve(myNetCrossings.size() + it.second->getGNECrossings().size());
1558 myNetCrossings.insert(myNetCrossings.end(), it.second->getGNECrossings().begin(), it.second->getGNECrossings().end());
1561 std::vector<GNECrossing*> myInvalidCrossings;
1562 for (
auto i = myNetCrossings.begin(); i != myNetCrossings.end(); i++) {
1563 if ((*i)->getNBCrossing()->valid ==
false) {
1564 myInvalidCrossings.push_back(*i);
1568 if (myInvalidCrossings.empty()) {
1570 WRITE_DEBUG(
"Opening FXMessageBox 'No crossing to remove'");
1572 FXMessageBox::warning(
getApp(), MBOX_OK,
1576 WRITE_DEBUG(
"Closed FXMessageBox 'No crossing to remove' with 'OK'");
1578 std::string plural = myInvalidCrossings.size() == 1 ? (
"") : (
"s");
1580 WRITE_DEBUG(
"Opening FXMessageBox 'clear crossings'");
1582 FXuint answer = FXMessageBox::question(
getApp(), MBOX_YES_NO,
1588 WRITE_DEBUG(
"Closed FXMessageBox 'clear crossings' with 'No'");
1589 }
else if (answer == 4) {
1590 WRITE_DEBUG(
"Closed FXMessageBox 'clear crossings' with 'ESC'");
1594 for (
auto i = myInvalidCrossings.begin(); i != myInvalidCrossings.end(); i++) {
1607 std::vector<GNEJunction*> toRemove;
1611 toRemove.push_back(junction);
1614 for (
auto it : toRemove) {
1625 undoList->
p_begin(
"Replace junction by geometry");
1631 for (
auto j : toJoin) {
1637 for (
auto con : connections) {
1669 if (endpoints.size() < 2) {
1673 undoList->
p_begin(
"Split junction");
1679 if (e->getNBEdge()->getGeometry().back().almostSame(pos)) {
1685 if (e->getNBEdge()->getGeometry().front().almostSame(pos)) {
1700 undoList->
p_begin(
"clear junction connections");
1703 for (
auto i : connections) {
1712 undoList->
p_begin(
"reset junction connections");
1729 i->updateConnectionIDs();
1750 std::vector<GNEAttributeCarrier*>
1752 std::vector<GNEAttributeCarrier*> result;
1757 result.push_back(AC);
1772 std::string oldID = junction->
getID();
1798 }
else if (hardFail) {
1799 throw ProcessError(
"Attempted to retrieve non-existant additional");
1806 std::vector<GNEAdditional*>
1808 std::vector<GNEAdditional*> result;
1811 for (
auto j : i.second) {
1812 if (!onlySelected || j.second->isAttributeCarrierSelected()) {
1813 result.push_back(j.second);
1821 const std::map<std::string, GNEAdditional*>&
1832 counter += (int)i.second.size();
1857 std::string netSaved = (
myNetSaved ?
"saved" :
"unsaved");
1858 std::string shapeSaved = (
myShapesSaved ?
"saved" :
"unsaved");
1859 WRITE_DEBUG(
"Current saving Status: net " + netSaved +
", additionals unsaved, shapes " + shapeSaved);
1875 std::vector<GNEStoppingPlace*> invalidStoppingPlaces;
1876 std::vector<GNEDetector*> invalidDetectors;
1878 for (
auto j : i.second) {
1883 invalidStoppingPlaces.push_back(stoppingPlace);
1885 invalidDetectors.push_back(detector);
1890 if (invalidStoppingPlaces.size() > 0 || invalidDetectors.size() > 0) {
1894 if (fixAdditionalPositionsDialog.execute() == 0) {
1929 for (
auto j : i.second) {
1931 j.second->writeAdditional(device);
1939 for (
auto j : i.second) {
1940 j.second->writeAdditional(device);
1947 for (
auto j : i.second) {
1948 j.second->writeAdditional(device);
1955 for (
auto j : i.second) {
1957 if (j.second->getFirstAdditionalParent() ==
nullptr) {
1958 j.second->writeAdditional(device);
1966 for (
auto j : i.second) {
1968 if (j.second->getFirstAdditionalParent() ==
nullptr) {
1969 j.second->writeAdditional(device);
1978 for (
auto j : i.second) {
1980 if (j.second->getFirstAdditionalParent() ==
nullptr) {
1981 j.second->writeAdditional(device);
1992 if (shape.size() > 0) {
1994 GNEPoly* shapePoly =
new GNEPoly(
this,
"edit_shape",
"edit_shape", shape,
false,
true, col,
GLO_POLYGON, 0,
"",
false,
false ,
false);
2016 throw ProcessError(
"Polygon for edit shapes has to be inicializated");
2026 std::string newID =
"poly_" +
toString(counter);
2030 newID =
"poly_" +
toString(counter);
2035 std::string newID =
"POI_" +
toString(counter);
2039 newID =
"POI_" +
toString(counter);
2068 std::string netSaved = (
myNetSaved ?
"saved" :
"unsaved");
2070 WRITE_DEBUG(
"Current saving Status: net " + netSaved +
", additionals " + additionalsSaved +
", shapes unsaved");
2088 dynamic_cast<GNEShape*
>(i.second)->writeShape(device);
2091 for (
const auto& i :
myPOIs) {
2092 dynamic_cast<GNEShape*
>(i.second)->writeShape(device);
2122 device.
openTag(
"additionals");
2196 for (
auto name_it : nodeContainer.
getAllNames()) {
2207 throw ProcessError(
"Network size exceeds 1 Lightyear. Please reconsider your inputs.\n");
2242 junction->
incRef(
"GNENet::registerJunction");
2266 edge->
incRef(
"GNENet::registerEdge");
2298 junction->
decRef(
"GNENet::deleteSingleJunction");
2317 edge->
decRef(
"GNENet::deleteSingleEdge");
2406 it.second->remakeGNEConnections();
2409 it.second->updateGeometry(
true);
2417 std::set<std::string> liveExplicitTurnarounds;
2420 liveExplicitTurnarounds.insert(it);
2436 if (oc.
getBool(
"numerical-ids") || oc.
isSet(
"reserved-ids")) {
2437 std::map<std::string, GNEEdge*> newEdgeMap;
2438 std::map<std::string, GNEJunction*> newJunctionMap;
2441 it.second->setMicrosimID(it.second->getNBEdge()->getID());
2442 newEdgeMap[it.second->getNBEdge()->getID()] = it.second;
2445 newJunctionMap[it.second->getNBNode()->getID()] = it.second;
2446 it.second->setMicrosimID(it.second->getNBNode()->getID());
2452 if (!oc.
getBool(
"offset.disable-normalization")) {
2455 it.second->updateGeometry(
true);
2467 if (volatileOptions) {
2475 for (
auto it : copyOfEdges) {
2481 for (
auto it : copyOfJunctions) {
2487 for (
const auto& j : it.second) {
2503 for (
const auto& it :
myPOIs) {
2514 it.second->remakeGNEConnections();
2520 it.second->setLogicValid(
true, 0);
2524 it.second->updateGeometry(
true);
2532 it.second->updateGeometry(
true);
2544 std::vector<std::string> values = GNEAttributeCarrier::parse<std::vector<std::string> >(ac->
getAttribute(key));
2545 std::vector<std::string> newValues;
2546 for (
auto v : values) {
2547 newValues.push_back(v == which ? by : v);
void setViewNet(GNEViewNet *viewNet)
Set the viewNet to be notified of network changes.
GNEJunction * splitEdge(GNEEdge *edge, const Position &pos, GNEUndoList *undoList, GNEJunction *newJunction=0)
split edge at position by inserting a new junction
LaneSpreadFunction getLaneSpreadFunction() const
Returns how this edge's lanes' lateral offset is computed.
void enableSaveTLSProgramsMenu()
enable save TLS Programs
bool addRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, int index, GNEUndoList *undoList)
add restricted lane to edge
std::vector< GNEJunction * > retrieveJunctions(bool onlySelected=false)
return all junctions
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
void setResponsible(bool newVal)
set responsibility for deleting internal strctures
std::string getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
std::vector< GNEConnection * > getGNEConnections() const
Returns all GNEConnections vinculated with this junction.
void initJunctionsAndEdges()
Init Junctions and edges.
void insertAdditional(GNEAdditional *additional)
Insert a additional element int GNENet container.
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
void close()
Closes the device and removes it from the dictionary.
GNEViewNet * myViewNet
The viewNet to be notofied of about changes.
SumoXMLTag
Numbers representing SUMO-XML - element names.
const std::set< GUIGlID > & getSelected() const
Returns the set of ids of all selected objects.
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
the function-object for an editing operation (abstract base)
A structure which describes a connection between edges or lanes.
void addIncomingGNEEdge(GNEEdge *edge)
add incoming GNEEdge
void enableSaveAdditionalsMenu()
enable save additionals
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
void removeInspectedAC(GNEAttributeCarrier *ac)
remove AC from current inspected ACs
IDSupplier myEdgeIDSupplier
description of a vehicle type
void closeBuilding(const Parameterised *p=0)
Closes the building of the table.
static std::vector< SumoXMLTag > allowedAdditionalTags(bool onlyDrawables)
get all editable for tag additional elements
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
const std::vector< GNEEdge * > & getGNEOutgoingEdges() const
Returns incoming GNEEdges.
void setStatusBarText(const std::string &statusBarText)
set text of the statusBar
int buildCrossings()
build pedestrian crossings
bool areStoppingPlacesPositionsFixed() const
check if Position of stoppingPlace are fixed
void append(const PositionVector &v, double sameThreshold=2.0)
void removeIncomingGNEEdge(GNEEdge *edge)
remove incoming GNEEdge
SUMORTree myGrid
the rtree which contains all GUIGlObjects (so named for historical reasons)
double z() const
Returns the z-position.
begin/end of the description of a junction
begin/end of the description of a single lane
std::map< std::string, GNEEdge * > edges
map with the name and pointer to edges of net
FXApp * getApp()
get pointer to the main App
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
void enableSaveShapesMenu()
enable save shapes
The main window of the Netedit.
bool changeID(const std::string &oldId, const std::string &newId)
change ID of a stored object
void removeEdgeFromCrossings(GNEEdge *edge, GNEUndoList *undoList)
removes the given edge from all pedestrian crossings
NBNetBuilder * getNetBuilder() const
get net builder
void setMicrosimID(const std::string &newID)
override to also set lane ids
const Polygons & getPolygons() const
Returns all polygons.
A container for traffic light definitions and built programs.
int size() const
Returns the number of stored items within the container.
std::map< SumoXMLTag, std::map< std::string, GNEAdditional * > > additionals
map with the name and pointer to additional elements of net
GNEAttributeCarrier * retrieveAttributeCarrier(const GUIGlID id, bool failHard=true)
get a single attribute carrier based on a GLID
connectio between two lanes
Stores the information about how to visualize structures.
virtual std::string getAttribute(SumoXMLAttr key) const =0
void removeShape(GNEShape *shape)
remove created shape (but NOT delete)
std::pair< PositionVector, PositionVector > splitAt(double where, bool use2D=false) const
Returns the two lists made when this list vector is splitted at the given point.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
GNEViewParent * getViewParent() const
get the net object
void addIncomingEdge(NBEdge *edge)
adds an incoming edge
double y() const
Returns the y-position.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
GNEConnection * retrieveConnection(const std::string &id, bool failHard=true) const
get Connection by id
T get(const std::string &id) const
Retrieves an item.
friend class GNEChange_Lane
The representation of a single edge during network building.
void reinitNodes(NBNode *from, NBNode *to)
Resets nodes but keeps all other values the same (used when joining)
Polygons myPolygons
stored Polygons
static void writeJoinedJunctions(const OptionsCont &oc, NBNodeCont &nc)
Writes the joined-juncionts to file.
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
void removeAdditionalGLObject(GUIGlObject *o)
Removes an additional object (detector/shape/trigger) from being visualised.
double x() const
Returns the x-position.
void avoid(const std::string &id)
make sure that the given id is never supplied
void reverseEdge(GNEEdge *edge, GNEUndoList *undoList)
reverse edge
void update()
notify myViewNet
void insertJunction(GNEJunction *junction)
inserts a single junction into the net and into the underlying netbuild-container ...
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
static const double UNSPECIFIED_OFFSET
unspecified lane offset
void deleteShape(GNEShape *shape, GNEUndoList *undoList)
remove shape
GNEPoly * retrievePolygon(const std::string &id, bool failHard=true) const
get Polygon by id
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
double getWidth() const
Returns the width of the boudary (x-axis)
void resetJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
reset junction's connections
A NBNetBuilder extended by visualisation and editing capabilities.
GNEEdge * createEdge(GNEJunction *src, GNEJunction *dest, GNEEdge *tpl, GNEUndoList *undoList, const std::string &suggestedName="", bool wasSplit=false, bool allowDuplicateGeom=false, bool recomputeConnections=true)
creates a new edge (unless an edge with the same geometry already exists)
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
std::vector< GNEConnection * > retrieveConnections(bool onlySelected=false) const
return all connections
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
void addExplicitTurnaround(std::string id)
add edge id to the list of explicit turnarounds
void rename(NBEdge *edge, const std::string &newID)
Renames the edge. Throws exception if newID already exists.
bool addPolygon(const std::string &id, const std::string &type, const RGBColor &color, double layer, double angle, const std::string &imgFile, bool relativePath, const PositionVector &shape, bool fill, bool geo, bool ignorePruning=false)
Builds a polygon using the given values and adds it to the container.
PositionVector reverse() const
reverse position vector
bool myAllowUndoShapes
flag used to indicate if shaped created can be undo
bool cleanInvalidCrossings(GNEUndoList *undoList)
clear invalid crossings
friend class GNEChange_Shape
int getNumberOfAdditionals(SumoXMLTag type=SUMO_TAG_NOTHING) const
Returns the number of additionals of the net.
Storage for geometrical objects.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
begin/end of the description of a Point of interest
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
void insertEdge(GNEEdge *edge)
inserts a single edge into the net and into the underlying netbuild-container
const std::string & getID() const
Returns the id.
bool isRailway(SVCPermissions permissions)
Returns whether an edge with the given permission is a railway edge.
static void writeTrafficLights(OutputDevice &into, const NBTrafficLightLogicCont &tllCont)
writes the traffic light logics to the given device
void setLineWidth(double lineWidth)
set a new shape and update the tesselation
Lane & getLaneStruct(int lane)
const Boundary & getBoundary() const
returns the bounder of the network
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
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.
static void sortNodesEdges(NBNodeCont &nc, bool useNodeShape=false)
Sorts a node's edges clockwise regarding driving direction.
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers()
get all selected attribute carriers
const std::string DEFAULT_VTYPE_ID
A RT-tree for efficient storing of SUMO's GL-objects.
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
virtual std::string getAttribute(SumoXMLAttr key) const =0
first coordinate of edge shape
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
void addOutgoingEdge(NBEdge *edge)
adds an outgoing edge
Boundary getBoundary() const
Returns the boundary of the junction.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
GNEJunction * registerJunction(GNEJunction *junction)
registers a junction with GNENet containers
static const double UNSPECIFIED_WIDTH
unspecified lane width
A class that stores a 2D geometrical boundary.
bool myNeedRecompute
whether the net needs recomputation
void selectAttributeCarrier(bool changeFlag=true)
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
begin/end of the description of a route
NBNetBuilder * myNetBuilder
The internal netbuilder.
bool netHasGNECrossings() const
check if net has GNECrossings
void setNetObject(GUIGlObject *object)
Sets the given object as the "network" object.
void saveTLSPrograms(const std::string &filename)
save TLS Programs elements of the network
static OptionsCont & getOptions()
Retrieves the options.
const EdgeVector & getOutgoingEdges() const
Returns this node's outgoing edges (The edges which start at this node)
bool priority
whether the pedestrians have priority
bool add(const std::string &id, T item)
Adds an item.
void disableSaveAdditionalsMenu()
disable save additionals
bool restrictLane(SUMOVehicleClass vclass, GNELane *lane, GNEUndoList *undoList)
transform lane to restricted lane
std::string generateShapeID(SumoXMLTag shapeTag) const
generate Shape ID
GNEAdditionalFrame * getAdditionalFrame() const
get frame for GNE_MODE_ADDITIONAL
bool myAdditionalsSaved
Flag to check if additionals has to be saved.
void renameJunction(GNEJunction *junction, const std::string &newID)
updates the map and reserves new id
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
void removeOutgoingGNEEdge(GNEEdge *edge)
remove outgoing GNEEdge
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
IDSupplier myJunctionIDSupplier
std::map< std::string, int > myEdgesAndNumberOfLanes
map with the Edges and their number of lanes
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
NBEdge::Connection & getNBEdgeConnection() const
get Edge::Connection
An (internal) definition of a single lane of an edge.
bool isStoppingPlace() const
return true if tag correspond to a detector (Only used to group all stoppingPlaces in the output XML)...
the function-object for an editing operation (abstract base)
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
void registerJoinedCluster(const NodeSet &cluster)
gets all joined clusters (see doc for myClusters2Join)
std::string getAttribute(SumoXMLAttr key) const
static const double Z_INITIALIZED
marker for whether the z-boundary is initialized
std::string getAttribute(SumoXMLAttr key) const
bool isTLControlled() const
Returns whether this node is controlled by any tls.
GNEUndoList * getUndoList() const
get the undoList object
int getIndex() const
returns the index of the lane
friend class GNEChange_Connection
const std::vector< GNEAdditional * > & getAdditionalParents() const
return vector of additionals that have as Parameter this edge (For example, Rerouters) ...
void updateAdditionalID(const std::string &oldID, GNEAdditional *additional)
update additional ID in container
std::set< NBEdge * > EdgeSet
container for unique edges
void removeConnectionsFrom(GNEEdge *edge, GNEUndoList *undoList, bool updateTLS, int lane=-1)
remove all connections from the given edge
std::string getNext()
Returns the next id.
void splitJunction(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by a list of junctions for each unique edge endpoint ...
bool removeRestrictedLane(SUMOVehicleClass vclass, GNEEdge &edge, GNEUndoList *undoList)
remove restricted lane
bool insert(NBEdge *edge, bool ignorePrunning=false)
Adds an edge to the dictionary.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GNEPoly * addPolygonForEditShapes(GNENetElement *netElement, const PositionVector &shape, bool fill, RGBColor col)
Builds a special polygon used for edit Junctions's shapes.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEEdge & getParentEdge()
Returns underlying parent edge.
void saveAdditionalsConfirmed(const std::string &filename)
save additionals after confirming invalid objects
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
bool hasDefaultGeometryEndpointAtNode(const NBNode *node) const
Returns whether the geometry is terminated by the node positions This default may be violated by init...
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
virtual bool isDetectorPositionFixed() const =0
check if Position of detector is fixed
void insertShape(GNEShape *shape)
insert shape
const std::vector< GNEEdge * > & getGNEIncomingEdges() const
Returns incoming GNEEdges.
std::string getLaneID(int lane) const
get Lane ID (Secure)
void extract(NBDistrictCont &dc, NBEdge *edge, bool remember=false)
Removes the given edge from the container like erase but does not delete it.
int getNumLanes() const
Returns the number of lanes.
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >())
Writes an XML header with optional configuration.
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true)
get junction by id
void setx(double x)
set position x
NBEdgeCont & getEdgeCont()
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
bool joinSelectedJunctions(GNEUndoList *undoList)
join selected junctions
Boundary myZBoundary
the z boundary (stored in the x-coordinate), values of 0 are ignored
void removeGLObjectFromGrid(GUIGlObject *o)
add GL Object into net
const PositionVector getInnerGeometry() const
Returns the geometry of the edge without the endpoints.
void replaceIncomingEdge(GNEEdge *which, GNEEdge *by, GNEUndoList *undoList)
replaces edge
void removeLaneOfAdditionalParents(GNEUndoList *undoList, bool allowEmpty)
remove lane of Additional Parent
void selectAttributeCarrier(bool changeFlag=true)
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
void updateGeometry(bool updateGrid)
Update the boundary of the junction.
virtual bool isAttributeCarrierSelected() const =0
check if attribute carrier is selected
bool addPOI(const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, const std::string &lane, double posOverLane, double posLat, double layer, double angle, const std::string &imgFile, bool relativePath, double width, double height, bool ignorePruning=false)
Builds a POI using the given values and adds it to the container.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
void removeAdditional(GNEAdditional *additional)
remove an additional element previously added
const EdgeVector & getEdges() const
Returns all edges which participate in this node (Edges that start or end at this node) ...
void computeJunction(GNEJunction *junction)
trigger recomputation of junction shape and logic param[in] window The window to inform about delay ...
void requiereSaveAdditionals(bool value)
inform that additionals has to be saved
Storage for edges, including some functionality operating on multiple edges.
void initGNEConnections()
initialize GNEConnections
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network into XML-files (nodes, edges, connections, traffic lights)
Dialog for edit rerouters.
void save(OptionsCont &oc)
save the network
edge: the shape in xml-definition
void removeConnectionsTo(GNEEdge *edge, GNEUndoList *undoList, bool updateTLS, int lane=-1)
remove all connections to the given edge
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
void addOutgoingGNEEdge(GNEEdge *edge)
add outgoing GNEEdge
const std::string getID() const
function to support debugging
friend class GNEChange_Edge
void clearInspectedAC()
Clear all current inspected ACs.
void changeShapeID(GNEShape *s, const std::string &OldID)
change Shape ID
GNEJunction * createJunction(const Position &pos, GNEUndoList *undoList)
creates a new junction
std::vector< GNEShape * > retrieveShapes(SumoXMLTag shapeTag, bool onlySelected=false)
return shape by type shapes
void splitEdgesBidi(const std::set< GNEEdge *> &edges, const Position &pos, GNEUndoList *undoList)
split all edges at position by inserting one new junction
GNEJunction * getGNEJunctionSource() const
returns the source-junction
void incRef(const std::string &debugMsg="")
Increarse reference.
virtual void updateGeometry(bool updateGrid)=0
update pre-computed geometry information
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
bool isDetector() const
return true if tag correspond to a shape (Only used to group all detectors in the XML) ...
SVCPermissions getPermissions(int lane=-1) const
get the union of allowed classes over all lanes or for a specific lane
void move2side(double amount)
move position vector to side using certain ammount
SUMORTree & getVisualisationSpeedUp()
Returns the RTree used for visualisation speed-up.
std::vector< GNEAttributeCarrier * > retrieveAttributeCarriers(SumoXMLTag type=SUMO_TAG_NOTHING)
get the attribute carriers based on Type
void selectAttributeCarrier(bool changeFlag=true)
select attribute carrier using GUIGlobalSelection
std::set< std::string > myExplicitTurnarounds
list of edge ids for which turn-arounds must be added explicitly
void decRef(const std::string &debugMsg="")
Decrease reference.
void rename(NBNode *node, const std::string &newID)
Renames the node. Throws exception if newID already exists.
begin/end of the description of an edge
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool checkJunctionPosition(const Position &pos)
return true if there are already a Junction in the given position, false in other case ...
static void writeNetwork(const OptionsCont &oc, NBNetBuilder &nb)
Writes the network stored in the given net builder.
const PositionVector & getGeometry() const
Returns the geometry of the edge.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
void replaceJunctionByGeometry(GNEJunction *junction, GNEUndoList *undoList)
replace the selected junction by geometry node(s) and merge the edges
A road/street connecting two junctions (netedit-version)
void reserveJunctionID(const std::string &id)
reserve junction ID (To avoid duplicates)
void duplicateLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
duplicates lane
void reset()
Resets the boundary.
void setResponsible(bool newVal)
set responsibility for deleting internal strctures
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
std::vector< std::string > getAllNames() const
get all node names
void deleteSingleJunction(GNEJunction *junction)
deletes a single junction
double width
This crossing's width.
const Boundary & getZBoundary() const
Returns the Z boundary (stored in the x() coordinate) values of 0 do not affect the boundary...
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
int customTLIndex
the custom traffic light index of this crossing (if controlled)
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
void setShapeEditedElement(GNENetElement *element)
retrieve the netElement of which the shape is being edited
const EdgeVector & getIncomingEdges() const
Returns this node's incoming edges (The edges which yield in this node)
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
const std::vector< Connection > & getConnections() const
Returns the connections.
NBConnection getNBConnection() const
get NBConnection
GNEEdge * registerEdge(GNEEdge *edge)
registers an edge with GNENet containers
PositionVector customShape
optional customShape for this crossing
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
NBNodeCont & getNodeCont()
Returns a reference to the node container.
double getHeight() const
Returns the height of the boundary (y-axis)
void addAdditionalGLObject(GUIGlObject *o)
Adds an additional object (detector/shape/trigger) for visualisation.
bool computeSingleLogic(OptionsCont &oc, NBTrafficLightDefinition *def)
Computes a specific traffic light logic (using by NETEDIT)
SumoXMLNodeType
Numbers representing special SUMO-XML-attribute values for representing node- (junction-) types used ...
An Element which don't belongs to GNENet but has influency in the simulation.
std::vector< GNEAdditional * > retrieveAdditionals(bool onlySelected=false) const
return all additionals
Instance responsible for building networks.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
friend class GNEChange_Junction
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node (The set of tls that control this node) ...
void removeSolitaryJunctions(GNEUndoList *undoList)
removes junctions that have no edges
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
double getTotalWidth() const
Returns the combined width of all lanes of this edge.
std::vector< Position > getEndPoints() const
return list of unique endpoint coordinates of all edges at this node
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
void disableSaveShapesMenu()
disable save shapes
void requiereSaveNet(bool value)
inform that net has to be saved
AttributeCarriers myAttributeCarriers
AttributeCarriers of net.
void sety(double y)
set position y
A storage for options typed value containers)
class for GNEChange_ReplaceEdgeInTLS
bool insert(const std::string &id, const Position &position, NBDistrict *district=0)
Inserts a node into the map.
void computeEverything(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false, std::string additionalPath="", std::string shapePath="")
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
NBTrafficLightLogicCont & getTLLogicCont()
Returns a reference to the traffic light logics container.
void clearJunctionConnections(GNEJunction *junction, GNEUndoList *undoList)
clear junction's connections
void computeAndUpdate(OptionsCont &oc, bool volatileOptions)
recompute the network and update lane geometries
int getNumberOfShapes() const
get number of shapes
crossing between edges for pedestrians
void renameEdge(GNEEdge *edge, const std::string &newID)
updates the map and reserves new id
static void replaceInListAttribute(GNEAttributeCarrier *ac, SumoXMLAttr key, const std::string &which, const std::string &by, GNEUndoList *undoList)
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
void replaceIncomingConnections(GNEEdge *which, GNEEdge *by, GNEUndoList *undoList)
replace one edge by another in all tls connections
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
void unselectAttributeCarrier(bool changeFlag=true)
unselect attribute carrier using GUIGlobalSelection
bool myTLSProgramsSaved
Flag to check if shapes has to be saved.
std::map< std::string, GNEJunction * > junctions
map with the name and pointer to junctions of net
std::vector< GNECrossing * > retrieveCrossings(bool onlySelected=false) const
return all crossings
void removeEdgeOfAdditionalParents(GNEUndoList *undoList, bool allowEmpty)
remove Edge of Additional Parent
const Position & getPosition() const
void removeExplicitTurnaround(std::string id)
remove edge id from the list of explicit turnarounds
EdgeVector edges
The edges being crossed.
Represents a single node (junction) during network building.
void saveJoined(OptionsCont &oc)
save log of joined junctions (and nothing else)
const std::map< std::string, GNEAdditional * > & getAdditionalByType(SumoXMLTag type) const
get map with IDs and pointers to additionals
void deleteAdditional(GNEAdditional *additional)
delete additional element of GNENet container
GNEEdge * addReversedEdge(GNEEdge *edge, GNEUndoList *undoList)
add reversed edge
Static storage of an output device and its base (abstract) implementation.
const std::vector< GNEAdditional * > & getAdditionalChilds() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
last coordinate of edge shape
NBNode::Crossing * getNBCrossing() const
get referente to NBode::Crossing
void push_back_noDoublePos(const Position &p)
insert in back a non double position
void unblockObject(GUIGlID id)
Marks an object as unblocked.
void reserveEdgeID(const std::string &id)
reserve edge ID (To avoid duplicates)
void compute(OptionsCont &oc, const std::set< std::string > &explicitTurnarounds=std::set< std::string >(), bool mayAddOrRemove=true)
Performs the network building steps.
static const TagValues & getTagProperties(SumoXMLTag tag)
get Tag Properties
NBNode * getFromNode() const
Returns the origin node of the edge.
void deleteSingleEdge(GNEEdge *edge)
deletes a single edge
void analyzeCluster(NodeSet cluster, std::string &id, Position &pos, bool &hasTLS, TrafficLightType &type, SumoXMLNodeType &nodeType)
Container for nodes during the netbuilding process.
void removePolygonForEditShapes(GNEPoly *polygon)
remove Polygon for edit shapes
NBEdge * getNBEdge()
returns the internal NBEdge
std::vector< GNEJunction * > getJunctionNeighbours() const
return GNEJunction neighbours
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
void mergeJunctions(GNEJunction *moved, GNEJunction *target, GNEUndoList *undoList)
merge the given junctions edges between the given junctions will be deleted
void requiereSaveTLSPrograms()
bool remove(const std::string &id, const bool del=true)
Removes an item.
begin/end of the description of a Point of interest over Lane (used by Netedit)
bool extract(NBNode *node, bool remember=false)
Removes the given node but does not delete it.
Boundary getBoundary() const
Returns the street's geometry.
#define WRITE_MESSAGE(msg)
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
static std::string getEdgeIDFromLane(const std::string laneID)
return edge id when given the lane ID
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
NBDistrictCont & getDistrictCont()
Returns a reference the districts container.
bool checkIsRemovable() const
check if node is removable
NBNode * getNBNode() const
Return net build node.
std::vector< std::string > getAllNames() const
Returns all ids of known edges.
std::vector< std::pair< NBEdge *, NBEdge * > > getEdgesToJoin() const
get edges to join
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
void addGLObjectIntoGrid(GUIGlObject *o)
add GL Object into net
GUISelectedStorage gSelected
A global holder of selected objects.
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
bool myShapesSaved
Flag to check if shapes has to be saved.
void setLogicValid(bool valid, GNEUndoList *undoList, const std::string &status=FEATURE_GUESSED)
A window containing a gl-object's parameter.
const std::vector< GNEShape * > & getShapeChilds() const
get shape childs of lane
void changeEdgeEndpoints(GNEEdge *edge, const std::string &newSourceID, const std::string &newDestID)
modifies endpoins of the given edge
NBTrafficLightLogicCont & getTLLogicCont()
returns the tllcont of the underlying netbuilder
bool wasSplit()
whether this edge was created from a split
int getNumberOfTLSPrograms() const
get number of TLS Programs
NBNode * getToNode() const
Returns the destination node of the edge.
void saveAdditionals(const std::string &filename)
save additional elements of the network
bool myNetSaved
Flag to check if net has to be saved.
void savePlain(OptionsCont &oc)
save plain xml representation of the network (and nothing else)
void requireRecompute()
inform the net about the need for recomputation
bool isNetSaved() const
return if net has to be saved
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
void invalidateTLS(GNEUndoList *undoList, const NBConnection &deletedConnection=NBConnection::InvalidConnection, const NBConnection &addedConnection=NBConnection::InvalidConnection)
void requiereSaveShapes(bool value)
inform that shapes has to be saved
void setFill(bool fill)
Sets whether the polygon shall be filled.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
begin/end of the description of a polygon
void markAsModified(GNEUndoList *undoList)
prevent re-guessing connections at this junction
GNEViewNet * getViewNet() const
get view net
void saveShapes(const std::string &filename)
save shapes elements of the network
GNEJunction * getParentJunction() const
get parent Junction
SumoXMLTag getTag() const
get XML Tag assigned to this object
const POIs & getPOIs() const
Returns all pois.