Abstract: Systems and methods for generating an optimized terrain database identify several regions, including test regions that are established from the identified regions. A first set of terrain data is received for a first test region. The first set of terrain data is compared to a second set of terrain data to determine a set of quality attributes. The quality attributes are used to determine a safety margin for the first test region. The safety margin is applied to other regions having the same or similar characteristics to the first test region. Safety margins are either generated for or applied to all other regions. All regions are then compiled into an area-wide terrain database, up to and including a worldwide database.