699 | | if aRelation.get('type') == 'route' and aRelation.get('network') == 'rcn': |
| 699 | rcnRelationWeWantToProcess = False # We need this again further on, when deciding whether or not to add this relation to the network |
| 700 | if aRelation.get('type') == 'route' and aRelation.get('network') == 'rcn' and not(aRelation.get('ref') in ['RUR','NRR','NRW','2LR','3LR','KAI','EHR','DFR','WBR','Nk']): |
| 701 | # The check on the ref is for Germany, where many rcn networks run crisscross through another. |
| 702 | # We wouldn't want to get entangled in that mess. |
| 703 | # The list is continuously getting longer, of course. But it's the best we can do here |
| 704 | rcnRelationWeWantToProcess = True |
723 | | if not(routeId in networkMembersList): |
724 | | if aRelation.get('network') == 'rcn': |
725 | | roleFromRouteCheck, problemReported, wikiReport = checkRCNroute(aRelation, aDownloadWasNeeded) |
726 | | if problemReported and 'createWikiReport' in sideEffects: |
727 | | wikiReportOnRelations += wikiReport + '\n|-\n' |
728 | | if 'addRouteToNetwork' in sideEffects and not(aDownloadWasNeeded): |
729 | | newRelation = Relation(network) |
730 | | newmember = RelationMember(roleFromRouteCheck, aRelation) |
731 | | if logVerbosity > 9: print newRelation.getMembersCount(), ' ',i, ' ', newmember |
732 | | newRelation.addMember( i, newmember) |
733 | | commandsList = [] |
734 | | commandsList.append(Command.ChangeCommand(network, newRelation)) |
735 | | note = aRelation.get('note') |
736 | | if not(note): |
737 | | note = '' |
738 | | Main.main.undoRedo.add(Command.SequenceCommand("Adding " + note + " to network", commandsList)) |
739 | | commandsList = [] |
740 | | if logVerbosity > 9: print 'Added newly found RCN route relation to network: ', note |
741 | | i+=1 |
| 728 | if rcnRelationWeWantToProcess and not(routeId in networkMembersList): |
| 729 | roleFromRouteCheck, problemReported, wikiReport = checkRCNroute(aRelation, aDownloadWasNeeded) |
| 730 | if problemReported and 'createWikiReport' in sideEffects: |
| 731 | wikiReportOnRelations += wikiReport + '\n|-\n' |
| 732 | if 'addRouteToNetwork' in sideEffects and not(aDownloadWasNeeded): |
| 733 | newRelation = Relation(network) |
| 734 | newmember = RelationMember(roleFromRouteCheck, aRelation) |
| 735 | if logVerbosity > 9: print newRelation.getMembersCount(), ' ',i, ' ', newmember |
| 736 | newRelation.addMember( i, newmember) |
| 737 | commandsList = [] |
| 738 | commandsList.append(Command.ChangeCommand(network, newRelation)) |
| 739 | note = aRelation.get('note') |
| 740 | if not(note): |
| 741 | note = '' |
| 742 | Main.main.undoRedo.add(Command.SequenceCommand("Adding " + note + " to network", commandsList)) |
| 743 | commandsList = [] |
| 744 | if logVerbosity > 9: print 'Added newly found RCN route relation to network: ', note |
| 745 | i+=1 |