Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_init(self):
c = Vectors()
self.assertIsInstance(c, Vectors)
def test_init(self):
c = Vectors()
self.assertIsInstance(c, Vectors)
# create and store an instance of the GBDX s3 client
self.s3 = S3()
# create and store an instance of the GBDX Ordering Client
self.ordering = Ordering()
# create and store an instance of the GBDX Catalog Client
self.catalog = Catalog()
# create and store an instance of the GBDX Workflow Client
self.workflow = Workflow()
# create and store an instance of the Idaho Client
self.idaho = Idaho()
self.vectors = Vectors()
self.catalog_image = CatalogImage
self.idaho_image = IdahoImage
self.landsat_image = LandsatImage
self.sentinel2 = Sentinel2
self.tms_image = TmsImage
self.dem_image = DemImage
self.wv03_vnir = WV03_VNIR
self.wv02 = WV02
self.ge01 = GE01
self.s3_image = S3Image
self.graph_image = GraphImage
self.task_registry = TaskRegistry()
def _find_parts(cat_id, band_type):
vectors = Vectors()
aoi = wkt.dumps(box(-180, -90, 180, 90))
query = "item_type:IDAHOImage AND attributes.catalogID:{} " \
"AND attributes.colorInterpretation:{}".format(cat_id, band_types[band_type])
return sorted(vectors.query(aoi, query=query), key=lambda x: x['properties']['id'])
def __init__(self, cat_id, band_type="MS", node="toa_reflectance", **kwargs):
self.interface = Auth()
self.vectors = Vectors()
self._gid = cat_id
self._band_type = band_type
self._pansharpen = kwargs.get('pansharpen', False)
self._acomp = kwargs.get('acomp', False)
if self._pansharpen:
self._node_id = 'pansharpened'
else:
self._node_id = node
self._level = kwargs.get('level', 0)
if 'proj' in kwargs:
self._proj = kwargs['proj']
if '_ipe_graphs' in kwargs:
self._ipe_graphs = kwargs['_ipe_graphs']
else:
self._ipe_graphs = self._init_graphs()
def vector_services_query(query, aoi=None, **kwargs):
vectors = Vectors()
if not aoi:
aoi = wkt.dumps(box(-180, -90, 180, 90))
_parts = sorted(vectors.query(aoi, query=query, **kwargs), key=lambda x: x['properties']['id'])
return _parts
# create and store an instance of the GBDX s3 client
self.s3 = S3()
# create and store an instance of the GBDX Ordering Client
self.ordering = Ordering()
# create and store an instance of the GBDX Catalog Client
self.catalog = Catalog()
# create and store an instance of the GBDX Workflow Client
self.workflow = Workflow()
# create and store an instance of the Idaho Client
self.idaho = Idaho()
self.vectors = Vectors()
self.catalog_image = CatalogImage
self.idaho_image = IdahoImage
self.landsat_image = LandsatImage
self.modis = Modis
self.sentinel1 = Sentinel1
self.sentinel2 = Sentinel2
self.tms_image = TmsImage
self.dem_image = DemImage
self.wv03_vnir = WV03_VNIR
self.wv03_swir = WV03_SWIR
self.wv02 = WV02
self.wv04 = WV04
self.ge01 = GE01
self.s3_image = S3Image
self.rda_template_image = RDATemplateImage