Exemplo n.º 1
0
    def _build_graph(cls,
                     idaho_id,
                     proj=None,
                     bucket="idaho-images",
                     gsd=None,
                     acomp=False,
                     bands="MS",
                     **kwargs):
        if bucket is None:
            vq = "item_type:IDAHOImage AND id:{}".format(idaho_id)
            result = vector_services_query(vq)
            if result:
                bucket = result[0]["properties"]["attributes"][
                    "tileBucketName"]

        gsd = gsd if gsd is not None else ""
        correction = "ACOMP" if acomp else kwargs.get("correctionType")
        spec = kwargs.get('spec')
        if spec == "1b":
            graph = rda.IdahoRead(bucketName=bucket,
                                  imageId=idaho_id,
                                  objectStore="S3",
                                  targetGSD=gsd)
        else:
            graph = rda.DigitalGlobeImage(bucketName=bucket,
                                          imageId=idaho_id,
                                          bands=bands,
                                          CRS=proj,
                                          correctionType=correction,
                                          GSD=gsd)

        return graph
Exemplo n.º 2
0
 def _find_parts(cat_id, band_type):
     query = "item_type:IDAHOImage AND attributes.catalogID:{}".format(cat_id)
     _parts = vector_services_query(query)
     if not len(_parts):
         raise MissingIdahoImages('Unable to find IDAHO imagery in the catalog: {}'.format(query))
     _id = vendor_id(_parts[0])
     return [p for p in _parts if vendor_id(p) == _id]
Exemplo n.º 3
0
 def _find_parts(cat_id, band_type):
     query = "item_type:IDAHOImage AND attributes.catalogID:{}".format(
         cat_id)
     _parts = vector_services_query(query)
     if not len(_parts):
         raise MissingIdahoImages(
             'Unable to find IDAHO imagery in the catalog: {}'.format(
                 query))
     _id = vendor_id(_parts[0])
     return [p for p in _parts if vendor_id(p) == _id]
Exemplo n.º 4
0
    def _build_graph(cls, idaho_id, proj=None, bucket="idaho-images", gsd=None, acomp=False, bands="MS", **kwargs):
        if bucket is None:
            vq = "item_type:IDAHOImage AND id:{}".format(idaho_id)
            result = vector_services_query(vq)
            if result:
               bucket = result[0]["properties"]["attributes"]["tileBucketName"]

        gsd = gsd if gsd is not None else ""
        correction = "ACOMP" if acomp else kwargs.get("correctionType")
        spec = kwargs.get('spec')
        if spec == "1b":
            graph = rda.IdahoRead(bucketName=bucket, imageId=idaho_id, objectStore="S3", targetGSD=gsd)
        else:
            graph = rda.DigitalGlobeImage(bucketName=bucket, imageId=idaho_id, bands=bands, CRS=proj, correctionType=correction, GSD=gsd)

        return graph
Exemplo n.º 5
0
 def _find_parts(cat_id, band_type):
     query = "item_type:IDAHOImage AND attributes.catalogID:{} " \
             "AND attributes.colorInterpretation:{}".format(cat_id, band_types[band_type])
     return vector_services_query(query)
Exemplo n.º 6
0
 def _find_parts(cat_id, band_type):
     query = "item_type:IDAHOImage AND attributes.catalogID:{}".format(
         cat_id)
     return vector_services_query(query)
Exemplo n.º 7
0
 def _find_parts(cat_id, band_type):
     query = "item_type:IDAHOImage AND attributes.catalogID:{} " \
             "AND attributes.colorInterpretation:{}".format(cat_id, band_types[band_type])
     return vector_services_query(query)
Exemplo n.º 8
0
 def _find_parts(cat_id, band_type):
     query = "item_type:IDAHOImage AND attributes.catalogID:{}".format(cat_id)
     return vector_services_query(query)