def _image_by_type(cls, cat_id, **kwargs):
vectors = Vectors()
aoi = wkt.dumps(box(-180, -90, 180, 90))
query = "item_type:GBDXCatalogRecord AND attributes.catalogID:{}".format(cat_id)
query += " AND NOT item_type:IDAHOImage AND NOT item_type:DigitalGlobeAcquisition"
result = vectors.query(aoi, query=query, count=1)
if len(result) == 0:
raise Exception('Could not find a catalog entry for the given id: {}'.format(cat_id))
else:
return cls._image_class(cat_id, result[0], **kwargs)
评论列表
文章目录