Characterization and detection of building patterns in cartographic data: Two algorithms