# Bugs can occur when deleting junctions

 This information is obsolete and the active links to this page have been reviewed for disconnection or replacement. More current alternate information is likely available and should be followed rather than this information.

## Deleting a junction can change the geometry of a road

A junction point also acts as a geometry point. By deleting that junction you get a straight line between the two geometry points on either side. This is a major problem because when recording a new road with many curves. Waze will often place junction points on corners. When these unnecessary junction points are removed, so are the curves. The correct behaviour is for Cartouche to place a geometry point at the place where a junction point is removed

## Deleting a junction can make a whole road segment disappear

This is a special case of the following problem. It occurs when the road segment only has two junctions and no intervening geometry points

## Deleting a junction can corrupt road geometry and make the road shorter and disconnected

Consider a road with lettered junctions and numbered geometry points. A--1--2--B--3--4--5--C. You delete the unnecessary junction point at B. The road then drops the segment from 5--C. You may also get a new geometry point appearing near B that connects to 5. The road loses connection to any other roads at junction C and needs to be manually reconnected.

This problem can easily be replicated. A theory is that even when one way roads become two way roads, they retain their one-way direction. When removing a junction causes these one-way directions to clash, the geometry flips. To replicate this bug in Cartouche:

• Create a one-way road drawn and named "West to East". Include at least 5 geometry points when drawing the road
• Create a second one-way road drawn and named "East to West" that ends on the eastern most point of the "West to East Road" . Include at least 5 geometry points when drawing the road
• Add a junction to connect the two one-way roads. Yes the roads travel in opposite directions
• Select both roads, and change them to "Two-way". Change the name to "One Street"
• Now remove the junction. You will see the end of "East to West" jump to a new location near where the junction was

Unfortunately recording a new road frequently results in one way roads of various directions that are converted to two-way roads and connected. It is very frustrating when repairing geometry and connectivity on a road with many unnecessary junctions, to have to fix jumping and disconnecting end points. Even worse when the disconnection is not noticed and the road can no longer be part of a route.

## Deleting a junction corrupts the speed data for the road segment

When removing a junction from a road segment the distance of the new combined segment is the sum (or close to it due to minor geometry changes noted above) of the two segments being connected. The time should be also be summed for each direction of travel on the road segment. However, the time data does not sum properly for direction 2 on the segment. This behavior is easy to demonstrate.

• Find a two way road segment of some length that also has time/speed data for both directions.
• Add a junction to the road segment, but not such that it connects with any other roads. Note the distance / and time information is split and the speed is close to the original segment's speed.
• Remove the junction to return the two segments back to one. Now the distance is back to normal and the time/speed for direction 1 is correct. Direction 2, however, will have a large time, resulting in a speed of 1 MPH/KPH in that direction.

This will cause routing issues until enough speed data is collected to bring the average time/speed back to normal.