39 #include <xercesc/sax/HandlerBase.hpp>
40 #include <xercesc/sax/AttributeList.hpp>
41 #include <xercesc/sax/SAXParseException.hpp>
42 #include <xercesc/sax/SAXException.hpp>
57 #ifdef CHECK_MEMORY_LEAKS
59 #endif // CHECK_MEMORY_LEAKS
77 myNodeCont(nc), myEdgeCont(ec), myTypeCont(tc), myDistrictCont(dc),
78 myCurrentEdge(0), myHaveReportedAboutOverwriting(false),
79 myHaveWarnedAboutDeprecatedSpreadType(false),
80 myHaveWarnedAboutDeprecatedFromTo(false),
81 myHaveWarnedAboutDeprecatedNoLanes(false),
82 myHaveWarnedAboutDeprecatedLaneId(false) {}
265 WRITE_ERROR(
"Additional lane information could not been set - the edge with id '" +
myCurrentID +
"' is not known.");
280 std::string allowed, disallowed, preferred;
312 WRITE_WARNING(
"Ignoring 'split' because it cannot be assigned to an edge");
331 WRITE_ERROR(
"Additional lane information could not been set - the edge with id '" +
myCurrentID +
"' is not known.");
338 std::vector<std::string> lanes;
340 for (std::vector<std::string>::iterator i = lanes.begin(); i != lanes.end(); ++i) {
343 e.
lanes.push_back(lane);
350 if (e.
lanes.empty()) {
352 e.
lanes.push_back((
int) l);
367 std::string oldBegID = begNodeID;
368 std::string oldEndID = endNodeID;
394 Position pos(begNodeXPos, begNodeYPos);
396 begNodeXPos = pos.
x();
397 begNodeYPos = pos.
y();
404 Position pos(endNodeXPos, endNodeYPos);
406 endNodeXPos = pos.
x();
407 endNodeYPos = pos.
y();
427 const std::string& attrName) {
436 const std::string& name,
const std::string& dir) {
439 WRITE_ERROR(
"Neither the name nor the position of the " + dir +
"-node is given for edge '" +
myCurrentID +
"'.");
446 WRITE_ERROR(
"Position of " + dir +
"-node '" + name +
"' mismatches previous positions.");
493 std::string lsfS =
toString(result);
546 std::vector<Split>::iterator i;
554 sort((*i).lanes.begin(), (*i).lanes.end());
555 noLanesMax =
MAX2(noLanesMax, (
unsigned int)(*i).lanes.size());
558 std::vector<int> currLanes;
559 for (
unsigned int l = 0; l < e->
getNumLanes(); ++l) {
560 currLanes.push_back(l);
562 std::string edgeid = e->
getID();
565 const Split& exp = *i;
566 assert(exp.
lanes.size() != 0);
573 std::string pid = e->
getID();
577 std::vector<int> newLanes = exp.
lanes;
583 unsigned int rightMostP = currLanes[0];
584 unsigned int rightMostN = newLanes[0];
585 for (
int l = 0; l < (
int) rightMostP - (
int) rightMostN; ++l) {
589 unsigned int leftMostP = currLanes.back();
590 unsigned int leftMostN = newLanes.back();
591 for (
int l = 0; l < (
int) leftMostN - (
int) leftMostP; ++l) {
595 for (
unsigned int l = 0; l < noLanesMax; ++l) {
596 if (find(currLanes.begin(), currLanes.end(), l) == currLanes.end()) {
599 if (find(newLanes.begin(), newLanes.end(), l) == newLanes.end()) {
606 currLanes = newLanes;
610 }
else if (exp.
pos == 0) {
616 currLanes = exp.
lanes;
628 unsigned int maxLeft = (*i).lanes.back();
629 if (maxLeft < noLanesMax) {