1. A machine readable medium storing a program for execution by at least one processing unit, the program comprising sets of instructions for: generating an initial set of geometries for a road graph defined for a map region, the road graph comprising a plurality of road segments and junctions aggregated into roads; identifying an overlap between a first geometry of a first road segment and a second geometry of a second road segment, wherein the first road segment and the second road segment are parts of different roads and do not meet at a junction; and automatically modifying at least one of the first and second geometries in order to prevent the first geometry and second geometry from overlapping.