Query metadata 📊
🔍 query_getPixels_image
- Description: Returns a DataFrame with the metadata required to retrieve data using
ee.data.getPixels
. - Arguments:
- 📍
points
: A list of tuples with coordinates (longitude, latitude). - 📚
collection
: GEE collection to query. - 🎨
bands
: Image bands to query. - 🖼️
edge_size
: Size of the query square. - 🎯
resolution
: Resolution of the query.
- 📍
- Returns:
pd.DataFrame
containing the metadata necessary for download.
table = fastcubo.query_getPixels_image(
points=[(-76.5, -9.5), (-76.5, -10.5), (-77.5, -10.5)],
collection="NASA/NASADEM_HGT/001",
bands=["elevation"],
edge_size=128,
resolution=90
)
print(table)
lon | lat | x | y | epsg | collection | bands | edge_size | resolution | manifest | outname |
---|---|---|---|---|---|---|---|---|---|---|
-76.5 | -9.5 | 329583.7418991233 | 8955272.65902687 | EPSG:32718 | NASA/NASADEM_HGT/001 | elevation | 128 | 90 | {'assetId': 'NASA/NASADEM_HGT/001', 'fileFormat': 'GEO_TIFF', 'bandIds': ['elevation'], 'grid': {'dimensions': {'width': 128, 'height': 128}, 'affineTransform': {'scaleX': 90, 'shearX': 0, 'translateX': 329583.7418991233, 'shearY': 0, 'scaleY': -90, 'translateY': 8955272.65902687}, 'crsCode': 'EPSG:32718'}} | NASA_NASADEM_HGT_001__0000.tif |
-76.5 | -10.5 | 330086.6486314098 | 8844673.258434067 | EPSG:32718 | NASA/NASADEM_HGT/001 | elevation | 128 | 90 | {'assetId': 'NASA/NASADEM_HGT/001', 'fileFormat': 'GEO_TIFF', 'bandIds': ['elevation'], 'grid': {'dimensions': {'width': 128, 'height': 128}, 'affineTransform': {'scaleX': 90, 'shearX': 0, 'translateX': 330086.6486314098, 'shearY': 0, 'scaleY': -90, 'translateY': 8844673.258434067}, 'crsCode': 'EPSG:32718'}} | NASA_NASADEM_HGT_001__0001.tif |
-77.5 | -10.5 | 220598.83698345214 | 8843976.459310157 | EPSG:32718 | NASA/NASADEM_HGT/001 | elevation | 128 | 90 | {'assetId': 'NASA/NASADEM_HGT/001', 'fileFormat': 'GEO_TIFF', 'bandIds': ['elevation'], 'grid': {'dimensions': {'width': 128, 'height': 128}, 'affineTransform': {'scaleX': 90, 'shearX': 0, 'translateX': 220598.83698345214, 'shearY': 0, 'scaleY': -90, 'translateY': 8843976.459310157}, 'crsCode': 'EPSG:32718'}} | NASA_NASADEM_HGT_001__0002.tif |
📅 query_getPixels_imagecollection
- Description: Similar to
query_getPixels_image
, but works with image collections instead of individual images. - Arguments: Adds
data_range
⏳ to specify the date range. - Returns:
pd.DataFrame
📝 with metadata needed to download image collections.
table = fastcubo.query_getPixels_imagecollection(
point=(51.079225, 10.452173),
collection="COPERNICUS/S2_HARMONIZED",
bands=["B4","B3","B2"],
data_range=["2016-06-01", "2017-07-01"],
edge_size=128,
resolution=10,
)
print(table)
lon | lat | x | y | epsg | collection | bands | edge_size | resolution | img_id | img_date | manifest | outname |
---|---|---|---|---|---|---|---|---|---|---|---|---|
51.079225 | 10.452173 | 508030.43405854504 | 1156048.1056529859 | EPSG:32639 | COPERNICUS/S2_HARMONIZED | B4, B3, B2 | 128 | 10 | COPERNICUS/S2_HARMONIZED/20160608T064632_20160608T070007_T39PVM | 2016-06-08 07:00:07 | {'assetId': 'COPERNICUS/S2_HARMONIZED/20160608T064632_20160608T070007_T39PVM', 'fileFormat': 'GEO_TIFF', 'bandIds': ['B4', 'B3', 'B2'], 'grid': {'dimensions': {'width': 128, 'height': 128}, 'affineTransform': {'scaleX': 10, 'shearX': 0, 'translateX': 508030.43405854504, 'shearY': 0, 'scaleY': -10, 'translateY': 1156048.1056529859}, 'crsCode': 'EPSG:32639'}} | 20160608T064632_20160608T070007_T39PVM.tif |
51.079225 | 10.452173 | 508030.43405854504 | 1156048.1056529859 | EPSG:32639 | COPERNICUS/S2_HARMONIZED | B4, B3, B2 | 128 | 10 | COPERNICUS/S2_HARMONIZED/20160608T064632_20160608T070007_T39PWM | 2016-06-08 07:00:07 | {'assetId': 'COPERNICUS/S2_HARMONIZED/20160608T064632_20160608T070007_T39PWM', 'fileFormat': 'GEO_TIFF', 'bandIds': ['B4', 'B3', 'B2'], 'grid': {'dimensions': {'width': 128, 'height': 128}, 'affineTransform': {'scaleX': 10, 'shearX': 0, 'translateX': 508030.43405854504, 'shearY': 0, 'scaleY': -10, 'translateY': 1156048.1056529859}, 'crsCode': 'EPSG:32639'}} | 20160608T064632_20160608T070007_T39PWM.tif |
51.079225 | 10.452173 | 508030.43405854504 | 1156048.1056529859 | EPSG:32639 | COPERNICUS/S2_HARMONIZED | B4, B3, B2 | 128 | 10 | COPERNICUS/S2_HARMONIZED/20160608T070007_20160608T103645_T39PVM | 2016-06-08 07:00:07 | {'assetId': 'COPERNICUS/S2_HARMONIZED/20160608T070007_20160608T103645_T39PVM', 'fileFormat': 'GEO_TIFF', 'bandIds': ['B4', 'B3', 'B2'], 'grid': {'dimensions': {'width': 128, 'height': 128}, 'affineTransform': {'scaleX': 10, 'shearX': 0, 'translateX': 508030.43405854504, 'shearY': 0, 'scaleY': -10, 'translateY': 1156048.1056529859}, 'crsCode': 'EPSG:32639'}} | 20160608T070007_20160608T103645_T39PVM.tif |