'Import Admin Boundaries into the Locations table
@param source - Source to get the data from.
Currently only GADM is supported: http://gadm.org
@param countries - List of ISO2 countrycodes to download data for
defaults to all countries
@param levels - Which levels of the hierarchy to import.
defaults to all 3 supported levels'

def import_admin_areas(self, source='gadmv1', countries=[], levels=['L0', 'L1', 'L2']):

    if (source == 'gadmv1'):
        try:
            from osgeo import ogr
        except:
            current.log.error('Unable    to    import    ogr.    Please    install    python-gdal    bindings:    GDAL-1.8.1+')
            return
        if ('L0' in levels):
            self.import_gadm1_L0(ogr, countries=countries)
        if ('L1' in levels):
            self.import_gadm1(ogr, 'L1', countries=countries)
        if ('L2' in levels):
            self.import_gadm1(ogr, 'L2', countries=countries)
        current.log.debug('All    done!')
    elif (source == 'gadmv1'):
        try:
            from osgeo import ogr
        except:
            current.log.error('Unable    to    import    ogr.    Please    install    python-gdal    bindings:    GDAL-1.8.1+')
            return
        if ('L0' in levels):
            self.import_gadm2(ogr, 'L0', countries=countries)
        if ('L1' in levels):
            self.import_gadm2(ogr, 'L1', countries=countries)
        if ('L2' in levels):
            self.import_gadm2(ogr, 'L2', countries=countries)
        current.log.debug('All    done!')
    else:
        current.log.warning('Only    GADM    is    currently    supported')
        return
    return
