Query DB less when finding edge Geometries

Use a Map instead. Should be faster.