1. A machine readable medium storing a program for execution by at least one processing unit of a server, 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, wherein the first and second geometries comprise centerline vertices; for at least two pairs of centerline vertices of the first and second geometries that are located adjacent to the overlap, applying a displacement amount that is proportional to an amount of overlap that is adjacent to each centerline vertex in the pairs, wherein the applied displacement amount is larger when the overlap is greater; and based on the applied displacement amount, moving centerline vertices of the first and second geometries apart from each other in order to prevent the first geometry and second geometry from overlapping.