How to use the ulmo.usgs.ned function in ulmo

To help you get started, we’ve selected a few ulmo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github erdc / quest / quest / services / usgs_ned.py View on Github external
def _get_features(self, service):
        service = self._layers()[service]
        features = util.to_geodataframe(
            ned.get_raster_availability(service, (-180, -90, 180, 90))
        )
        if features.empty:
            return features

        features['parameters'] = 'elevation'
        features['file_format'] = 'raster-gdal'
        features['filename'] = features['download url'].apply(lambda x: x.split('/')[-1])
        columns = {
            'name': 'display_name',
            'download url': 'download_url',
            'format': 'extract_from_zip',
            }
        features['reserved'] = features['download url'].apply(lambda x: {'download_url': x, 'file_format': 'raster-gdal','extract_from_zip': '.DEM'})
        return features.rename(columns=columns)
github erdc / quest / quest_provider_plugins / usgs_ned.py View on Github external
def search_catalog(self, **kwargs):
        service = self._description
        catalog_entries = util.to_geodataframe(
            ned.get_raster_availability(service, (-180, -90, 180, 90))
        )
        if catalog_entries.empty:
            return catalog_entries

        catalog_entries['parameters'] = 'elevation'
        catalog_entries['filename'] = catalog_entries['download url'].apply(lambda x: x.split('/')[-1])
        catalog_entries['reserved'] = catalog_entries.apply(
            lambda x: {'download_url': x['download url'],
                       'filename': x['filename'],
                       'file_format': 'raster-gdal',
                       'extract_from_zip': '.img',
                       }, axis=1)

        catalog_entries.drop(labels=['filename', 'download url', 'format'], axis=1, inplace=True)

        return catalog_entries.rename(columns={'name': 'display_name'})