How to use the gbdxtools.rda.interface.RDA function in gbdxtools

To help you get started, we’ve selected a few gbdxtools 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 DigitalGlobe / gbdxtools / gbdxtools / images / idaho_image.py View on Github external
from gbdxtools.images.base import RDABaseImage
from gbdxtools.images.drivers import IdahoDriver
from gbdxtools.images.util import vector_services_query
from gbdxtools.rda.util import calc_toa_gain_offset, ortho_params
from gbdxtools.rda.interface import RDA

from shapely import wkt
from shapely.geometry import box

rda = RDA()

class IdahoImage(RDABaseImage):
    """ Image based on IDAHO virtual tiles

        Like a CatalogImage, but takes an IDAHO ID when initialized.
        Band_type and pansharpen arguments are not supported because IDAHO multispectral and panchromatic images are stored separately.

        Args:
            (str): IDAHO ID

        Example:
            >>> img = IdahoImage('87a5b5a7-5438-44bf-926a-c8c7bc153713')
    """
    __Driver__ = IdahoDriver

    @property
github DigitalGlobe / gbdxtools / gbdxtools / images / dem_image.py View on Github external
from gbdxtools.images.base import RDABaseImage
from gbdxtools.images.drivers import RDADaskImageDriver
from gbdxtools.rda.util import reproject_params
from gbdxtools.rda.interface import RDA

rda = RDA()

from shapely.geometry import box

class DemDriver(RDADaskImageDriver):
    image_option_support = ["proj", "bbox"]
    __image_option_defaults__ = {"bbox": None}

class DemImage(RDABaseImage):
    ''' Image class for Digital Elevation Model (DEM) data from the NED/SRTM dataset.

        This class has no Catalog IDs and is created by passing an AOI. It shares most of the same methods as CatalogImage objects.

        Args:
            aoi (list): list of coordinate in BBOX format
            proj (str): (optional) EPSG string of projection reproject to. Native projection is "EPSG:4326" (WGS84)
github DigitalGlobe / gbdxtools / gbdxtools / images / ikonos.py View on Github external
from gbdxtools.images.base import RDABaseImage
from gbdxtools.images.drivers import RDADaskImageDriver
from gbdxtools.rda.interface import RDA
from gbdxtools.rda.error import IncompatibleOptions
from gbdxtools.rda.util import ortho_params
rda = RDA()

band_types = {
    'MS': 'multispectral',
    'ms': 'multispectral',
    'Panchromatic': 'panchromatic',
    'Pan': 'panchromatic',
    'pan': 'panchromatic',
    'thermal': 'thermal'
}

class IkonosDriver(RDADaskImageDriver):
    image_option_support = ["proj", "gsd", "band_type", "pansharpen"]
    __image_option_defaults__ = {"gsd": None, "band_type": "MS", "pansharpen": False}

class IkonosImage(RDABaseImage):
    """
github DigitalGlobe / gbdxtools / gbdxtools / images / geoeye01.py View on Github external
from gbdxtools.images.worldview import WorldViewImage
from gbdxtools.images.drivers import WorldViewDriver
from gbdxtools.images.util import vector_services_query
from gbdxtools.rda.interface import RDA
rda = RDA()

band_types = {
    'MS': 'BGRN',
    'Panchromatic': 'PAN',
    'Pan': 'PAN',
    'pan': 'PAN'
}

class GeoEyeDriver(WorldViewDriver):
    __image_option_defaults__ = {"correctionType": "DN"}


class GE01(WorldViewImage):
    __Driver__ = GeoEyeDriver

    @property
github DigitalGlobe / gbdxtools / gbdxtools / images / radarsat.py View on Github external
import os
from gbdxtools.images.base import RDABaseImage
from gbdxtools.images.drivers import RDADaskImageDriver
from gbdxtools.rda.util import ortho_params
from gbdxtools.rda.interface import RDA

rda = RDA()


class RadarsatDriver(RDADaskImageDriver):
    image_option_support = ["calibration", "proj"]
    __image_option_defaults__ = {"calibration": "uncalibrated", "proj": "EPSG:4326"}


class Radarsat(RDABaseImage):
    """
      Dask based access to Radarsat images backed by rda Graphs.

     Args:
        catID (str): The Radarsat record from the Radarsat Catalog Item
        calibration (str): Data calibration. Options are 'uncalibrated' (default), 'beta0', 'sigma0' or 'gamma'.
        proj (str): EPSG code for the resulting image.
        gsd (str): Resolution for the resulting image.
github DigitalGlobe / gbdxtools / gbdxtools / images / drivers / base.py View on Github external
from gbdxtools.rda.interface import RDA
from gbdxtools.images.exceptions import *

import collections
import six

rda = RDA()

RDA_DEFAULT_OPTIONS = {
    "proj": "EPSG:4326",
    "gsd": None
    }

IDAHO_DEFAULT_OPTIONS = {
    "proj": "EPSG:4326",
    "gsd": None,
    "acomp": False,
    "bucket": 'rda-images-1',
    "correctionType": "TOAREFLECTANCE",
    "bands": "MS",
    "spec": None
    }
github DigitalGlobe / gbdxtools / gbdxtools / images / worldview.py View on Github external
"""
GBDX Catalog Image Interface.
Contact: chris.helm@digitalglobe.com
"""
from __future__ import print_function
import json
import warnings 

from gbdxtools.images.drivers import WorldViewDriver, RDADaskImageDriver
from gbdxtools.images.base import RDABaseImage
from gbdxtools import IdahoImage
from gbdxtools.images.util import vector_services_query, vendor_id, band_types
from gbdxtools.rda.interface import RDA
from gbdxtools.rda.error import MissingIdahoImages, AcompUnavailable

rda = RDA()

RDA_DTYPES = {
    None: '4',
    'uint8': "0",
    'uint16': "1",
    'int16': "2",
    'int32': "3",
    'float32': "4",
    'float64': "5"
}

class WorldViewImage(RDABaseImage):
    __Driver__ = WorldViewDriver
    _parts = None

    @property
github DigitalGlobe / gbdxtools / gbdxtools / images / landsat_image.py View on Github external
from gbdxtools.images.base import RDABaseImage
from gbdxtools.images.drivers import RDADaskImageDriver
from gbdxtools.images.util.image import reproject_params
from gbdxtools.rda.error import IncompatibleOptions
from gbdxtools.rda.interface import RDA
rda = RDA()

band_types = {
    'MS': 'multispectral',
    'ms': 'multispectral',
    'Panchromatic': 'panchromatic',
    'Pan': 'panchromatic',
    'pan': 'panchromatic',
    'thermal': 'thermal'
}

class LandsatDriver(RDADaskImageDriver):
    __default_options__ = {}
    image_option_support = ["band_type", "proj", "pansharpen"]
    __image_option_defaults__ = {"band_type": "MS", "proj": None, "pansharpen": False}

class LandsatImage(RDABaseImage):
github DigitalGlobe / gbdxtools / gbdxtools / images / sentinel.py View on Github external
from gbdxtools.images.base import RDABaseImage
from gbdxtools.images.drivers import RDADaskImageDriver
from gbdxtools.images.util.image import reproject_params
from gbdxtools.rda.interface import RDA
rda = RDA()


class Sentinel2Driver(RDADaskImageDriver):
    image_option_support = ["spec", "proj"]
    __image_option_defaults__ = {"spec": "10m", "proj": None}


class Sentinel2(RDABaseImage):
    """
     Dask based access to Sentinel2 images backed by rda Graphs.
     
     Args:
        prefix (str): The Sentinel data location from Catalog metadata item 'bucketPrefix'
        spec (str): Sensor group to use, values are '10m' (default), '20m', and '60m'
        proj (str): EPSG code for the resulting image, defaults to EPSG:4326 (WGS 84 Lat/Lon)
    """
github DigitalGlobe / gbdxtools / gbdxtools / images / modis.py View on Github external
from gbdxtools.images.base import RDABaseImage
from gbdxtools.images.drivers import RDADaskImageDriver
from gbdxtools.images.util.image import reproject_params
from gbdxtools.rda.interface import RDA
rda = RDA()

class ModisDriver(RDADaskImageDriver):
    image_option_support = ["proj"]
    __image_option_defaults__ = {"proj": None}

class Modis(RDABaseImage):
    """
     Dask based access to Modis images backed by rda Graphs.
     
     Args:
        catalog_id (str): The Catalog ID for the modis image.
    """
    __Driver__ = ModisDriver

    @property
    def _id(self):