Geospatial analysts often have a set of vector data (points, lines, and polygons) that label areas where they want to look at satellite imagery.
The code below works through some common steps for this kind of analysis:
- Reading the vector data from common formats
- Reading the Earth OnDemand catalog using the vector geometry
- Filtering and reasoning on the vector data and EO metadata
- Reading the imagery as a Spark DataFrame
After this is complete, in our analysis we will compute the normalized difference built-up index (NDBI) for large US urban areas in 2018 in two analysis steps.
Analysis steps:
- "Burning-in" or rasterizing the geometry alongside the image tiles
- Computing mean built-up index
from earthai.init import * import pyspark.sql.functions as F import geopandas import pandas as pd
Importing EarthAI libraries. EarthAI version 1.6.0; RasterFrames version 0.9.0; PySpark version 2.4.7 Creating SparkSession...
SparkSession is available as `spark`.
We will download some vector data from the US Census Bureau, delineating different urban areas.
Read Vector Data
The data is in a shapefile. We will read it as a GeoDataFrame, which is a Pandas DataFrame with extras for handling vector data!
You can also read shapefiles with Spark using spark.read.shapefile
.
! wget -nc -nv https://www2.census.gov/geo/tiger/TIGER2019/UAC/tl_2019_us_uac10.zip
wget: /opt/conda/envs/earthai/lib/libuuid.so.1: no version information available (required by wget)
! unzip -n tl_2019_us_uac10.zip
Archive: tl_2019_us_uac10.zip
uac = geopandas.read_file('tl_2019_us_uac10.shp') print("Rows: ", len(uac)) _ = uac.centroid.plot()
Rows: 3601

Let's reduce the scope to the top 50 urban areas by the US Census reported land area.
uac_50 = uac.nlargest(50, 'ALAND10') print("Rows: ", len(uac_50)) _ = uac_50.plot()
Rows: 50

uac_50.NAME10
2321 New York--Newark, NY--NJ--CT 3002 Atlanta, GA 3250 Chicago, IL--IN 2546 Philadelphia, PA--NJ--DE--MD 1593 Boston, MA--NH--RI 2844 Dallas--Fort Worth--Arlington, TX 3294 Los Angeles--Long Beach--Anaheim, CA 936 Houston, TX 1101 Detroit, MI 3035 Washington, DC--VA--MD 815 Miami, FL 3403 Phoenix--Mesa, AZ 3000 Minneapolis--St. Paul, MN--WI 607 Seattle, WA 1162 Tampa--St. Petersburg, FL 1634 St. Louis, MO--IL 1997 Pittsburgh, PA 916 San Juan, PR 1334 Cincinnati, OH--KY--IN 2458 Cleveland, OH 683 Charlotte, NC--SC 2169 San Diego, CA 3180 Baltimore, MD 515 Indianapolis, IN 1090 Kansas City, MO--KS 1123 Denver--Aurora, CO 3566 San Antonio, TX 753 Orlando, FL 2221 Nashville-Davidson, TN 2627 Milwaukee, WI 3296 Riverside--San Bernardino, CA 2043 Providence, RI--MA 557 Jacksonville, FL 984 Birmingham, AL 713 Portland, OR--WA 1678 San Francisco--Oakland, CA 3567 Austin, TX 2158 Raleigh, NC 371 Hartford, CT 801 Virginia Beach, VA 1448 Columbus, OH 2718 Memphis, TN--MS--AR 3291 Richmond, VA 1790 Louisville/Jefferson County, KY--IN 1675 Sacramento, CA 3337 Bridgeport--Stamford, CT--NY 865 Knoxville, TN 2400 Las Vegas--Henderson, NV 1869 Oklahoma City, OK 3486 Columbia, SC Name: NAME10, dtype: object
earth_ondemand.collections()
allowed | description | familyId | familyTitle | id | item_assets | license | presentable | sortableFields | stac_extensions | stac_version | title | link | spatial_extent | temporal_extent | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | True | Landsat 8 Collection 1 Tier 1 Precision Terrain from Landsat 8 Operational Land Imager (OLI) and Thermal Infrared Sensor (TIRS) data | landsat8 | Landsat 8 | landsat8_l1tp | {'B5': {'bundleable': True, 'eo:bands': [{'common_name': 'nir', 'name': 'B5'}], 'eo:common_name': 'nir', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 5 - Near Infrared (NIR) - 851-879nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'thumb_large': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Thumbnail - Large', 'type': 'image/jpeg'}, 'B6': {'bundleable': True, 'eo:bands': [{'common_name': 'swir16', 'name': 'B6'}], 'eo:common_name': 'swir16', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 6 - Shortwave Infrared (SWIR) 1 - 1566-1651nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B3': {'bundleable': True, 'eo:bands': [{'common_name': 'green', 'name': 'B3'}], 'eo:common_name': 'green', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 3 - Green - 533-590nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B2': {'bundleable': True, 'eo:bands': [{'common_name': 'blue', 'name': 'B2'}], 'eo:common_name': 'blue', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 2 - Blue - 452-512nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'BQA': {'bundleable': True, 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['qa'], 'title': 'Band QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B4': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B4'}], 'eo:common_name': 'red', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 4 - Red - 636-673nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B1': {'bundleable': True, 'eo:bands': [{'common_name': 'coastal', 'name': 'B1'}], 'eo:common_name': 'coastal', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 1 - Ultra Blue (coastal/aerosol) - 435-451nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B11': {'bundleable': True, 'eo:bands': [{'common_name': 'lwir12', 'name': 'B11'}], 'eo:common_name': 'lwir12', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 11 - Thermal Infrared (TIRS) 2 - 11500-12510nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'MTL': {'bundleable': True, 'roles': ['metadata'], 'title': 'Product Metadata', 'type': 'text/plain'}, 'thumb_small': {'bundleable': True, 'roles': ['thumbnail'], 'title': 'Thumbnail - Small', 'type': 'image/jpeg'}, 'B9': {'bundleable': True, 'eo:bands': [{'common_name': 'cirrus', 'name': 'B9'}], 'eo:common_name': 'cirrus', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 9 - Cirrus - 1363-1384nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B7': {'bundleable': True, 'eo:bands': [{'common_name': 'swir22', 'name': 'B7'}], 'eo:common_name': 'swir22', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 7 - Shortwave Infrared (SWIR) 2 - 2107-2294nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B10': {'bundleable': True, 'eo:bands': [{'common_name': 'lwir11', 'name': 'B10'}], 'eo:common_name': 'lwir11', 'eo:gsd': 30.0, 'gsd': 30.0, 'roles': ['data'], 'title': 'Band 10 - Thermal Infrared (TIRS) 1 - 10600-11190nm (30m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B8': {'bundleable': True, 'eo:bands': [{'common_name': 'pan', 'name': 'B8'}], 'eo:common_name': 'pan', 'eo:gsd': 15.0, 'gsd': 15.0, 'roles': ['data'], 'title': 'Band 8 - Panchromatic - 503-676nm (15m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'ANG': {'bundleable': True, 'roles': ['metadata'], 'title': 'Angle Coefficient Metadata', 'type': 'text/plain'}} | PDDL-1.0 | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | Landsat 8 C1 T1 | https://eod-catalog-svc-prod.astraea.earth/collections/landsat8_l1tp | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2013-03-18 15:59:02.333000+00:00, None) |
1 | True | MCD43A4: MODIS/Terra and Aqua Nadir BRDF-Adjusted Reflectance Daily L3 Global 500 m SIN Grid V006 | modis | MODIS | mcd43a4 | {'B06qa': {'bundleable': True, 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['qa'], 'title': 'Band 6 - QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B01': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B01'}], 'eo:common_name': 'red', 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['data'], 'title': 'Band 1 - Red - 620-670nm (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B05': {'bundleable': True, 'eo:bands': [{'name': 'B05'}], 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['data'], 'title': 'Band 5 - SWIR - 1230-1250nm (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B02': {'bundleable': True, 'eo:bands': [{'common_name': 'nir', 'name': 'B02'}], 'eo:common_name': 'nir', 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['data'], 'title': 'Band 2 - NIR - 841-876nm (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B01qa': {'bundleable': True, 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['qa'], 'title': 'Band 1 - QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B06': {'bundleable': True, 'eo:bands': [{'common_name': 'swir16', 'name': 'B06'}], 'eo:common_name': 'swir16', 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['data'], 'title': 'Band 6 - SWIR - 1628-1652nm (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B02qa': {'bundleable': True, 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['qa'], 'title': 'Band 2 - QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B03qa': {'bundleable': True, 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['qa'], 'title': 'Band 3 - QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B03': {'bundleable': True, 'eo:bands': [{'common_name': 'blue', 'name': 'B03'}], 'eo:common_name': 'blue', 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['data'], 'title': 'Band 3 - Blue - 459-479nm (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B04qa': {'bundleable': True, 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['qa'], 'title': 'Band 4 - QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}, 'B07qa': {'bundleable': True, 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['qa'], 'title': 'Band 7 - QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B05qa': {'bundleable': True, 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['qa'], 'title': 'Band 5 - QA', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B04': {'bundleable': True, 'eo:bands': [{'common_name': 'green', 'name': 'B04'}], 'eo:common_name': 'green', 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['data'], 'title': 'Band 4 - Green - 545-565nm (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'B07': {'bundleable': True, 'eo:bands': [{'common_name': 'swir22', 'name': 'B07'}], 'eo:common_name': 'swir22', 'eo:gsd': 500.0, 'gsd': 500.0, 'roles': ['data'], 'title': 'Band 7 - SWIR - 2105-2155nm (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}} | CC-PDDC | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | MCD43A4 NBAR | https://eod-catalog-svc-prod.astraea.earth/collections/mcd43a4 | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2000-02-16 00:00:00+00:00, None) |
2 | True | MOD11A1: MODIS/Terra Land Surface Temperature/Emissivity Daily L3 Global 1 km SIN Grid V006 | modis | MODIS | mod11a1 | {'QCD': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Daytime LST Quality Indicators (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'DVT': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'Local time of day observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'E31': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Band 31 emissivity (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NVT': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'Local time of night observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'E32': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Band 32 emissivity (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'CNC': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Night clear-sky coverage (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'LSTN': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Nighttime Land Surface Temperature (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'CDC': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Day clear-sky coverage (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NVA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'View zenith angle of night observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'DVA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'View zenith angle of day observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'LSTD': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Daytime Land Surface Temperature (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}, 'QCN': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Nighttime LST Quality indicators (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}} | CC-PDDC | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | MOD11A1 LST | https://eod-catalog-svc-prod.astraea.earth/collections/mod11a1 | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2000-02-24 00:00:00+00:00, None) |
3 | True | MYD11A1: MODIS/Aqua Land Surface Temperature/Emissivity Daily L3 Global 1 km SIN Grid V006 | modis | MODIS | myd11a1 | {'QCD': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Daytime LST Quality Indicators (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'DVT': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'Local time of day observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'E31': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Band 31 emissivity (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NVT': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'Local time of night observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'E32': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Band 32 emissivity (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'CNC': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Night clear-sky coverage (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'LSTN': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Nighttime Land Surface Temperature (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'CDC': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Day clear-sky coverage (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NVA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'View zenith angle of night observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'DVA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'View zenith angle of day observation (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'LSTD': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': 'Daytime Land Surface Temperature (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}, 'QCN': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Nighttime LST Quality indicators (1000m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}} | CC-PDDC | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | MYD11A1 LST | https://eod-catalog-svc-prod.astraea.earth/collections/myd11a1 | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2002-07-04 00:00:00+00:00, None) |
4 | True | MOD13A1: MODIS/Terra Vegetation Indices 16-Day L3 Global 500 m SIN Grid V006 | modis | MODIS | mod13a1 | {'PR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Quality reliability of VI pixel (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'SZA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': '16 days sun zenith angle (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'MIRR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days MIR reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'BR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days blue reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'RAA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': '16 days relative azimuth angle (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NDVI': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 day NDVI average (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'VIQ': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'VI Quality indicators (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'RR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days red reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'EVI': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 day EVI average (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'VZA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': '16 days view zenith angle (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'CDOY': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'Day of year VI pixel (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NIRR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days NIR reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}} | CC-PDDC | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | MOD13A1 VI | https://eod-catalog-svc-prod.astraea.earth/collections/mod13a1 | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2000-02-18 00:00:00+00:00, None) |
5 | True | MYD13A1: MODIS/Aqua Vegetation Indices 16-Day L3 Global 500 m SIN Grid V006 | modis | MODIS | myd13a1 | {'PR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'Quality reliability of VI pixel (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'SZA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': '16 days sun zenith angle (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'MIRR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days MIR reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'BR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days blue reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'RAA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': '16 days relative azimuth angle (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NDVI': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 day NDVI average (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'VIQ': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['qa'], 'title': 'VI Quality indicators (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'RR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days red reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'EVI': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 day EVI average (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'VZA': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': '16 days view zenith angle (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'CDOY': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['metadata'], 'title': 'Day of year VI pixel (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'NIRR': {'bundleable': True, 'eo:gsd': 1000.0, 'gsd': 1000.0, 'roles': ['data'], 'title': '16 days NIR reflectance (500m)', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}} | CC-PDDC | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | MYD13A1 VI | https://eod-catalog-svc-prod.astraea.earth/collections/myd13a1 | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2002-07-04 00:00:00+00:00, None) |
6 | True | Sentinel-2 Level-2A atmospherically corrected data | sentinel | Sentinel | sentinel2_l2a | {'B03_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'green', 'name': 'B03'}], 'eo:common_name': 'green', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 3 - Green - 559.8/559.0nm (60m)', 'type': 'image/jp2'}, 'CLD_20m': {'bundleable': True, 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['qa'], 'title': 'Cloud (20m)', 'type': 'image/jp2'}, 'B05_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B05'}], 'eo:common_name': 'rededge', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 5 - Vegetation Red Edge - 704.1/703.8nm (20m)', 'type': 'image/jp2'}, 'SNW_60m': {'bundleable': True, 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['qa'], 'title': 'Snow (60m)', 'type': 'image/jp2'}, 'B07_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B07'}], 'eo:common_name': 'rededge', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 7 – Vegetation Red Edge - 782.8/779.7nm (60m)', 'type': 'image/jp2'}, 'B08_10m': {'bundleable': True, 'eo:bands': [{'common_name': 'nir', 'name': 'B08'}], 'eo:common_name': 'nir', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 8 – NIR - 832.8/832.9nm (10m)', 'type': 'image/jp2'}, 'B05_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B05'}], 'eo:common_name': 'rededge', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 5 - Vegetation Red Edge - 704.1/703.8nm (60m)', 'type': 'image/jp2'}, 'B12_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'swir22', 'name': 'B12'}], 'eo:common_name': 'swir22', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 12 – SWIR - 2202.4/2185.7nm (60m)', 'type': 'image/jp2'}, 'B01_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'coastal', 'name': 'B01'}], 'eo:common_name': 'coastal', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 1 - Coastal aerosol - 442.7/442.2nm (60m)', 'type': 'image/jp2'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}, 'TCI_20m': {'bundleable': True, 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'True Color Image (20m)', 'type': 'image/jp2'}, 'B08_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'nir', 'name': 'B08'}], 'eo:common_name': 'nir', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 8 – NIR - 832.8/832.9nm (20m)', 'type': 'image/jp2'}, 'cloud_mask': {'bundleable': True, 'roles': ['qa'], 'title': 'Cloud mask', 'type': 'application/gml+xml'}, 'tileInfo': {'bundleable': True, 'roles': ['metadata'], 'title': 'Tile info', 'type': 'application/json'}, 'B06_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B06'}], 'eo:common_name': 'rededge', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 6 – Vegetation Red Edge - 740.5/739.1nm (60m)', 'type': 'image/jp2'}, 'B08_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'nir', 'name': 'B08'}], 'eo:common_name': 'nir', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 8 – NIR - 832.8/832.9nm (60m)', 'type': 'image/jp2'}, 'B02_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'blue', 'name': 'B02'}], 'eo:common_name': 'blue', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 2 - Blue - 492.4/492.1nm (20m)', 'type': 'image/jp2'}, 'B11_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'swir16', 'name': 'B11'}], 'eo:common_name': 'swir16', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 11 – SWIR - 1613.7/1610.4nm (20m)', 'type': 'image/jp2'}, 'WVP_60m': {'bundleable': True, 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Water Vapor (60m)', 'type': 'image/jp2'}, 'AOT_60m': {'bundleable': True, 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Aerosol Optical Thickness (60m)', 'type': 'image/jp2'}, 'WVP_10m': {'bundleable': True, 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Water Vapor (10m)', 'type': 'image/jp2'}, 'B06_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B06'}], 'eo:common_name': 'rededge', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 6 – Vegetation Red Edge - 740.5/739.1nm (20m)', 'type': 'image/jp2'}, 'WVP_20m': {'bundleable': True, 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Water Vapor (20m)', 'type': 'image/jp2'}, 'B8A_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'nir08', 'name': 'B8A'}], 'eo:common_name': 'nir08', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 8A – Narrow NIR - 864.7/864nm (20m)', 'type': 'image/jp2'}, 'B07_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B07'}], 'eo:common_name': 'rededge', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 7 – Vegetation Red Edge - 782.8/779.7nm (20m)', 'type': 'image/jp2'}, 'B12_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'swir22', 'name': 'B12'}], 'eo:common_name': 'swir22', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 12 – SWIR - 2202.4/2185.7nm (20m)', 'type': 'image/jp2'}, 'SCL_20m': {'bundleable': True, 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Scene Classification (20m)', 'type': 'image/jp2'}, 'B11_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'swir16', 'name': 'B11'}], 'eo:common_name': 'swir16', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 11 – SWIR - 1613.7/1610.4nm (60m)', 'type': 'image/jp2'}, 'SNW_20m': {'bundleable': True, 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['qa'], 'title': 'Snow (20m)', 'type': 'image/jp2'}, 'B09_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'nir09', 'name': 'B09'}], 'eo:common_name': 'nir09', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 9 – Water vapour - 945.1/943.2nm (60m)', 'type': 'image/jp2'}, 'productInfo': {'bundleable': True, 'roles': ['metadata'], 'title': 'Product info', 'type': 'application/json'}, 'B04_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B04'}], 'eo:common_name': 'red', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 4 - Red - 664.6/664.9nm (60m)', 'type': 'image/jp2'}, 'B04_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B04'}], 'eo:common_name': 'red', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 4 - Red - 664.6/664.9nm (20m)', 'type': 'image/jp2'}, 'TCI_10m': {'bundleable': True, 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'True Color Image (10m)', 'type': 'image/jp2'}, 'B8A_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'nir08', 'name': 'B8A'}], 'eo:common_name': 'nir08', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 8A – Narrow NIR - 864.7/864nm (60m)', 'type': 'image/jp2'}, 'B02_60m': {'bundleable': True, 'eo:bands': [{'common_name': 'blue', 'name': 'B02'}], 'eo:common_name': 'blue', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 2 - Blue - 492.4/492.1nm (60m)', 'type': 'image/jp2'}, 'metadata': {'bundleable': True, 'roles': ['metadata'], 'title': 'Tile metadata', 'type': 'application/xml'}, 'SCL_60m': {'bundleable': True, 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Scene Classification (60m)', 'type': 'image/jp2'}, 'B04_10m': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B04'}], 'eo:common_name': 'red', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 4 - Red - 664.6/664.9nm (10m)', 'type': 'image/jp2'}, 'B03_10m': {'bundleable': True, 'eo:bands': [{'common_name': 'green', 'name': 'B03'}], 'eo:common_name': 'green', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 3 - Green - 559.8/559.0nm (10m)', 'type': 'image/jp2'}, 'TCI_60m': {'bundleable': True, 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'True Color Image (60m)', 'type': 'image/jp2'}, 'AOT_20m': {'bundleable': True, 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Aerosol Optical Thickness (20m)', 'type': 'image/jp2'}, 'B03_20m': {'bundleable': True, 'eo:bands': [{'common_name': 'green', 'name': 'B03'}], 'eo:common_name': 'green', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 3 - Green - 559.8/559.0nm (20m)', 'type': 'image/jp2'}, 'B02_10m': {'bundleable': True, 'eo:bands': [{'common_name': 'blue', 'name': 'B02'}], 'eo:common_name': 'blue', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 2 - Blue - 492.4/492.1nm (10m)', 'type': 'image/jp2'}, 'CLD_60m': {'bundleable': True, 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['qa'], 'title': 'Cloud (60m)', 'type': 'image/jp2'}, 'AOT_10m': {'bundleable': True, 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Aerosol Optical Thickness (10m)', 'type': 'image/jp2'}, 'preview_image': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview Image', 'type': 'image/jp2'}} | CC-BY-SA-3.0 | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | Sentinel-2 L2A | https://eod-catalog-svc-prod.astraea.earth/collections/sentinel2_l2a | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2018-04-01 07:02:22.463000+00:00, None) |
7 | True | Sentinel-2 Level-1C top of atmosphere | sentinel | Sentinel | sentinel2_l1c | {'B04_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 4 - Red - 664.6/664.9nm', 'type': 'image/jp2'}, 'B01': {'bundleable': True, 'eo:bands': [{'common_name': 'coastal', 'name': 'B01'}], 'eo:common_name': 'coastal', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 1 - Coastal aerosol - 442.7/442.2nm (60m)', 'type': 'image/jp2'}, 'B09': {'bundleable': True, 'eo:bands': [{'common_name': 'nir09', 'name': 'B09'}], 'eo:common_name': 'nir09', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 9 – Water vapour - 945.1/943.2nm (60m)', 'type': 'image/jp2'}, 'B07_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 7 – Vegetation Red Edge - 782.8/779.7nm', 'type': 'image/jp2'}, 'B03_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 3 - Green - 559.8/559.0nm', 'type': 'image/jp2'}, 'B02': {'bundleable': True, 'eo:bands': [{'common_name': 'blue', 'name': 'B02'}], 'eo:common_name': 'blue', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 2 - Blue - 492.4/492.1nm (10m)', 'type': 'image/jp2'}, 'B01_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 1 - Coastal aerosol - 442.7/442.2nm', 'type': 'image/jp2'}, 'B06': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B06'}], 'eo:common_name': 'rededge', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 6 – Vegetation Red Edge - 740.5/739.1nm (20m)', 'type': 'image/jp2'}, 'B8A': {'bundleable': True, 'eo:bands': [{'common_name': 'nir08', 'name': 'B8A'}], 'eo:common_name': 'nir08', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 8A – Narrow NIR - 864.7/864nm (20m)', 'type': 'image/jp2'}, 'B03': {'bundleable': True, 'eo:bands': [{'common_name': 'green', 'name': 'B03'}], 'eo:common_name': 'green', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 3 - Green - 559.8/559.0nm (10m)', 'type': 'image/jp2'}, 'B10_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 10 – SWIR – Cirrus - 1373.5/1376.9nm', 'type': 'image/jp2'}, 'B8A_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 8A – Narrow NIR - 864.7/864nm', 'type': 'image/jp2'}, 'preview_image': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview Image', 'type': 'image/jpeg'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}, 'B11': {'bundleable': True, 'eo:bands': [{'common_name': 'swir16', 'name': 'B11'}], 'eo:common_name': 'swir16', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 11 – SWIR - 1613.7/1610.4nm (20m)', 'type': 'image/jp2'}, 'cloud_mask': {'bundleable': True, 'roles': ['qa'], 'title': 'Cloud mask', 'type': 'application/gml+xml'}, 'tileInfo': {'bundleable': True, 'roles': ['metadata'], 'title': 'Tile info', 'type': 'application/json'}, 'B09_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 9 – Water vapour - 945.1/943.2nm ', 'type': 'image/jp2'}, 'B11_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 11 – SWIR - 1613.7/1610.4nm', 'type': 'image/jp2'}, 'B12': {'bundleable': True, 'eo:bands': [{'common_name': 'swir22', 'name': 'B12'}], 'eo:common_name': 'swir22', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 12 – SWIR - 2202.4/2185.7nm (20m)', 'type': 'image/jp2'}, 'B05': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B05'}], 'eo:common_name': 'rededge', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 5 - Vegetation Red Edge - 704.1/703.8nm (20m)', 'type': 'image/jp2'}, 'TCI': {'bundleable': True, 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'True Color Image (10m)', 'type': 'image/jp2'}, 'B08_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 8 – NIR - 832.8/832.9nm', 'type': 'image/jp2'}, 'preview_image_jp2': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview Image (JPEG2000)', 'type': 'image/jp2'}, 'productInfo': {'bundleable': True, 'roles': ['metadata'], 'title': 'Product info', 'type': 'application/json'}, 'B06_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 6 – Vegetation Red Edge - 740.5/739.1nm', 'type': 'image/jp2'}, 'B05_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 5 - Vegetation Red Edge - 704.1/703.8nm', 'type': 'image/jp2'}, 'B10': {'bundleable': True, 'eo:bands': [{'common_name': 'cirrus', 'name': 'B10'}], 'eo:common_name': 'cirrus', 'eo:gsd': 60.0, 'gsd': 60.0, 'roles': ['data'], 'title': 'Band 10 – SWIR – Cirrus - 1373.5/1376.9nm (60m)', 'type': 'image/jp2'}, 'B02_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 2 - Blue - 492.4/492.1nm', 'type': 'image/jp2'}, 'B12_preview': {'bundleable': True, 'roles': ['overview', 'preview'], 'title': 'Preview - Band 12 – SWIR - 2202.4/2185.7nm', 'type': 'image/jp2'}, 'B08': {'bundleable': True, 'eo:bands': [{'common_name': 'nir', 'name': 'B08'}], 'eo:common_name': 'nir', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 8 – NIR - 832.8/832.9nm (10m)', 'type': 'image/jp2'}, 'metadata': {'bundleable': True, 'roles': ['metadata'], 'title': 'Tile metadata', 'type': 'application/xml'}, 'B04': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B04'}], 'eo:common_name': 'red', 'eo:gsd': 10.0, 'gsd': 10.0, 'roles': ['data'], 'title': 'Band 4 - Red - 664.6/664.9nm (10m)', 'type': 'image/jp2'}, 'B07': {'bundleable': True, 'eo:bands': [{'common_name': 'rededge', 'name': 'B07'}], 'eo:common_name': 'rededge', 'eo:gsd': 20.0, 'gsd': 20.0, 'roles': ['data'], 'title': 'Band 7 – Vegetation Red Edge - 782.8/779.7nm (20m)', 'type': 'image/jp2'}} | CC-BY-SA-3.0 | True | [properties.eo:cloud_cover, id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | Sentinel-2 L1C | https://eod-catalog-svc-prod.astraea.earth/collections/sentinel2_l1c | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2015-06-27 10:25:31.456000+00:00, None) |
8 | True | National Agriculture Imagery Program aerial imagery | naip | NAIP | naip | {'analytic_rgbir': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B1'}, {'common_name': 'green', 'name': 'B2'}, {'common_name': 'blue', 'name': 'B3'}, {'common_name': 'nir', 'name': 'B4'}], 'eo:common_name': 'red', 'eo:gsd': 1.0, 'gsd': 1.0, 'roles': ['data'], 'title': 'Analytic RGBIR (1m)', 'type': 'application/x.mrf'}, 'source_rgbir': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B1'}, {'common_name': 'green', 'name': 'B2'}, {'common_name': 'blue', 'name': 'B3'}, {'common_name': 'nir', 'name': 'B4'}], 'eo:common_name': 'red', 'eo:gsd': 1.0, 'gsd': 1.0, 'roles': ['data'], 'title': 'Source RGBIR (1m)', 'type': 'image/tiff'}, 'visual_rgb': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B1'}, {'common_name': 'green', 'name': 'B2'}, {'common_name': 'blue', 'name': 'B3'}], 'eo:common_name': 'red', 'eo:gsd': 1.0, 'gsd': 1.0, 'roles': ['overview', 'preview'], 'title': 'Visualization RGB (1m)', 'type': 'image/tiff'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}} | CC-PDDC | True | [id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | NAIP | https://eod-catalog-svc-prod.astraea.earth/collections/naip | POLYGON ((-66.9513812 24.7433195, -66.9513812 4... | (2012-04-23 12:00:00+00:00, None) |
9 | True | Maxar Open Data | maxar | Maxar | maxar_open_data | {'rgb': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B1'}, {'common_name': 'green', 'name': 'B2'}, {'common_name': 'blue', 'name': 'B3'}], 'eo:common_name': 'red', 'roles': ['data'], 'title': 'RGB GeoTIFF', 'type': 'image/tiff; application=geotiff'}, 'eod_thumbnail': {'bundleable': False, 'roles': ['thumbnail'], 'title': 'Thumbnail', 'type': 'image/jpeg'}} | CC-BY-NC-4.0 | True | [id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | Maxar Open Data | https://eod-catalog-svc-prod.astraea.earth/collections/maxar_open_data | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2008-01-15 00:00:00+00:00, None) |
10 | True | SpaceNet 7 Imagery and Labels | spacenet7 | SpaceNet | spacenet7 | {'image_masked': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B1'}, {'common_name': 'green', 'name': 'B2'}, {'common_name': 'blue', 'name': 'B3'}], 'eo:common_name': 'red', 'roles': ['data'], 'title': 'Image Masked', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'buildings_labels_match': {'bundleable': True, 'title': 'Buildings Labels Match', 'type': 'application/geo+json'}, 'labels': {'bundleable': True, 'title': 'Labels', 'type': 'application/geo+json'}, 'udm_mask': {'bundleable': True, 'title': 'UDM Mask', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}, 'udm_labels': {'bundleable': True, 'title': 'UDM Labels', 'type': 'application/geo+json'}, 'image': {'bundleable': True, 'eo:bands': [{'common_name': 'red', 'name': 'B1'}, {'common_name': 'green', 'name': 'B2'}, {'common_name': 'blue', 'name': 'B3'}], 'eo:common_name': 'red', 'roles': ['data'], 'title': 'Image', 'type': 'image/tiff; application=geotiff; profile=cloud-optimized'}} | CC-BY-SA-4.0 | True | [id, properties.created, properties.datetime, collection] | [item-assets] | 1.0.0-beta.2 | SpaceNet 7 | https://eod-catalog-svc-prod.astraea.earth/collections/spacenet7 | POLYGON ((180 -90, 180 90, -180 90, -180 -90, 1... | (2018-01-01 00:00:00+00:00, None) |
Let's get some low cloud MODIS imagery for the first quarter of 2018. Note here the use of simplify
to reduce the complexity of the city boundaries. The MODIS scenes are very, very large relative to the city boundaries so we still get all the relevant scenes but the query is much faster.
Another interesting point here is we can pass in almost any kind of vector data. It can be a file-like python object such as an open vector file, the str path to a vector file, a shapely
geometry object, etc. See help(earth_ondemand.read_catalog)
for more.
catalog = earth_ondemand.read_catalog( uac_50.geometry.simplify(0.2), '2018-01-01', '2018-03-31', max_cloud_cover=0, collections='mcd43a4' )
HBox(children=(FloatProgress(value=0.0, max=990.0), HTML(value='')))
Here is the magic bit, we will do a @ref:spatial join between our catalog and our city DataFrame.
This attaches the city information to the scene information!
uac_catalog = geopandas.sjoin(uac_50, catalog.to_crs(uac_50.crs))
Summarize the number of images for each city. The id
column contains the unique scene identifier for the raster data product.
uac_catalog.groupby('NAME10').count().id
NAME10 Atlanta, GA 180 Austin, TX 180 Baltimore, MD 90 Birmingham, AL 90 Boston, MA--NH--RI 90 Bridgeport--Stamford, CT--NY 90 Charlotte, NC--SC 90 Chicago, IL--IN 90 Cincinnati, OH--KY--IN 90 Cleveland, OH 90 Columbia, SC 90 Columbus, OH 180 Dallas--Fort Worth--Arlington, TX 90 Denver--Aurora, CO 180 Detroit, MI 90 Hartford, CT 90 Houston, TX 180 Indianapolis, IN 180 Jacksonville, FL 180 Kansas City, MO--KS 90 Knoxville, TN 90 Las Vegas--Henderson, NV 90 Los Angeles--Long Beach--Anaheim, CA 90 Louisville/Jefferson County, KY--IN 90 Memphis, TN--MS--AR 90 Miami, FL 90 Milwaukee, WI 90 Minneapolis--St. Paul, MN--WI 90 Nashville-Davidson, TN 180 New York--Newark, NY--NJ--CT 180 Oklahoma City, OK 90 Orlando, FL 90 Philadelphia, PA--NJ--DE--MD 180 Phoenix--Mesa, AZ 90 Pittsburgh, PA 90 Portland, OR--WA 90 Providence, RI--MA 90 Raleigh, NC 90 Richmond, VA 90 Riverside--San Bernardino, CA 90 Sacramento, CA 90 San Antonio, TX 90 San Diego, CA 90 San Francisco--Oakland, CA 90 San Juan, PR 90 Seattle, WA 90 St. Louis, MO--IL 90 Tampa--St. Petersburg, FL 90 Virginia Beach, VA 90 Washington, DC--VA--MD 180 Name: id, dtype: int64
# have to reset the index because the left DF in the join has had its index repeated across rows uac_catalog.reset_index(inplace=True) least_cloud_img_per_city = uac_catalog.groupby('NAME10').eo_cloud_cover.idxmin() uac_least_cloudy = uac_catalog.loc[least_cloud_img_per_city] assert len(uac_least_cloudy) == len(uac_50) uac_least_cloudy[['index', 'NAME10', 'id', 'eo_cloud_cover', 'datetime']]
index | NAME10 | id | eo_cloud_cover | datetime | |
---|---|---|---|---|---|
991 | 3002 | Atlanta, GA | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
4649 | 3567 | Austin, TX | MCD43A4.A2018087.h09v06.006.2018096031847 | 0.0 | 2018-03-20 00:00:00+00:00 |
19 | 3180 | Baltimore, MD | MCD43A4.A2018072.h12v05.006.2018081140137 | 0.0 | 2018-03-05 00:00:00+00:00 |
2083 | 984 | Birmingham, AL | MCD43A4.A2018064.h10v05.006.2018073033024 | 0.0 | 2018-02-25 00:00:00+00:00 |
848 | 1593 | Boston, MA--NH--RI | MCD43A4.A2018077.h12v04.006.2018086031336 | 2.0 | 2018-03-10 00:00:00+00:00 |
851 | 3337 | Bridgeport--Stamford, CT--NY | MCD43A4.A2018077.h12v04.006.2018086031336 | 2.0 | 2018-03-10 00:00:00+00:00 |
994 | 683 | Charlotte, NC--SC | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
3006 | 3250 | Chicago, IL--IN | MCD43A4.A2018072.h11v04.006.2018081134952 | 0.0 | 2018-03-05 00:00:00+00:00 |
993 | 1334 | Cincinnati, OH--KY--IN | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
3010 | 2458 | Cleveland, OH | MCD43A4.A2018072.h11v04.006.2018081134952 | 0.0 | 2018-03-05 00:00:00+00:00 |
1003 | 3486 | Columbia, SC | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
999 | 1448 | Columbus, OH | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
3510 | 2844 | Dallas--Fort Worth--Arlington, TX | MCD43A4.A2018092.h09v05.006.2018101032056 | 4.0 | 2018-03-25 00:00:00+00:00 |
5149 | 1123 | Denver--Aurora, CO | MCD43A4.A2018073.h09v04.006.2018082204521 | 1.0 | 2018-03-06 00:00:00+00:00 |
3007 | 1101 | Detroit, MI | MCD43A4.A2018072.h11v04.006.2018081134952 | 0.0 | 2018-03-05 00:00:00+00:00 |
850 | 371 | Hartford, CT | MCD43A4.A2018077.h12v04.006.2018086031336 | 2.0 | 2018-03-10 00:00:00+00:00 |
4647 | 936 | Houston, TX | MCD43A4.A2018087.h09v06.006.2018096031847 | 0.0 | 2018-03-20 00:00:00+00:00 |
995 | 515 | Indianapolis, IN | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
2082 | 557 | Jacksonville, FL | MCD43A4.A2018064.h10v05.006.2018073033024 | 0.0 | 2018-02-25 00:00:00+00:00 |
2080 | 1090 | Kansas City, MO--KS | MCD43A4.A2018064.h10v05.006.2018073033024 | 0.0 | 2018-02-25 00:00:00+00:00 |
1002 | 865 | Knoxville, TN | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
3932 | 2400 | Las Vegas--Henderson, NV | MCD43A4.A2018098.h08v05.006.2018108202556 | 1.0 | 2018-03-31 00:00:00+00:00 |
3926 | 3294 | Los Angeles--Long Beach--Anaheim, CA | MCD43A4.A2018098.h08v05.006.2018108202556 | 1.0 | 2018-03-31 00:00:00+00:00 |
1001 | 1790 | Louisville/Jefferson County, KY--IN | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
2084 | 2718 | Memphis, TN--MS--AR | MCD43A4.A2018064.h10v05.006.2018073033024 | 0.0 | 2018-02-25 00:00:00+00:00 |
4778 | 815 | Miami, FL | MCD43A4.A2018086.h10v06.006.2018095185440 | 0.0 | 2018-03-19 00:00:00+00:00 |
3012 | 2627 | Milwaukee, WI | MCD43A4.A2018072.h11v04.006.2018081134952 | 0.0 | 2018-03-05 00:00:00+00:00 |
3008 | 3000 | Minneapolis--St. Paul, MN--WI | MCD43A4.A2018072.h11v04.006.2018081134952 | 0.0 | 2018-03-05 00:00:00+00:00 |
996 | 2221 | Nashville-Davidson, TN | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
16 | 2321 | New York--Newark, NY--NJ--CT | MCD43A4.A2018072.h12v05.006.2018081140137 | 0.0 | 2018-03-05 00:00:00+00:00 |
2085 | 1869 | Oklahoma City, OK | MCD43A4.A2018064.h10v05.006.2018073033024 | 0.0 | 2018-02-25 00:00:00+00:00 |
4780 | 753 | Orlando, FL | MCD43A4.A2018086.h10v06.006.2018095185440 | 0.0 | 2018-03-19 00:00:00+00:00 |
17 | 2546 | Philadelphia, PA--NJ--DE--MD | MCD43A4.A2018072.h12v05.006.2018081140137 | 0.0 | 2018-03-05 00:00:00+00:00 |
3927 | 3403 | Phoenix--Mesa, AZ | MCD43A4.A2018098.h08v05.006.2018108202556 | 1.0 | 2018-03-31 00:00:00+00:00 |
3009 | 1997 | Pittsburgh, PA | MCD43A4.A2018072.h11v04.006.2018081134952 | 0.0 | 2018-03-05 00:00:00+00:00 |
5150 | 713 | Portland, OR--WA | MCD43A4.A2018073.h09v04.006.2018082204521 | 1.0 | 2018-03-06 00:00:00+00:00 |
849 | 2043 | Providence, RI--MA | MCD43A4.A2018077.h12v04.006.2018086031336 | 2.0 | 2018-03-10 00:00:00+00:00 |
997 | 2158 | Raleigh, NC | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
1000 | 3291 | Richmond, VA | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
3929 | 3296 | Riverside--San Bernardino, CA | MCD43A4.A2018098.h08v05.006.2018108202556 | 1.0 | 2018-03-31 00:00:00+00:00 |
3931 | 1675 | Sacramento, CA | MCD43A4.A2018098.h08v05.006.2018108202556 | 1.0 | 2018-03-31 00:00:00+00:00 |
4648 | 3566 | San Antonio, TX | MCD43A4.A2018087.h09v06.006.2018096031847 | 0.0 | 2018-03-20 00:00:00+00:00 |
3928 | 2169 | San Diego, CA | MCD43A4.A2018098.h08v05.006.2018108202556 | 1.0 | 2018-03-31 00:00:00+00:00 |
3930 | 1678 | San Francisco--Oakland, CA | MCD43A4.A2018098.h08v05.006.2018108202556 | 1.0 | 2018-03-31 00:00:00+00:00 |
5404 | 916 | San Juan, PR | MCD43A4.A2018065.h11v07.006.2018074032938 | 0.0 | 2018-02-26 00:00:00+00:00 |
5148 | 607 | Seattle, WA | MCD43A4.A2018073.h09v04.006.2018082204521 | 1.0 | 2018-03-06 00:00:00+00:00 |
2079 | 1634 | St. Louis, MO--IL | MCD43A4.A2018064.h10v05.006.2018073033024 | 0.0 | 2018-02-25 00:00:00+00:00 |
4779 | 1162 | Tampa--St. Petersburg, FL | MCD43A4.A2018086.h10v06.006.2018095185440 | 0.0 | 2018-03-19 00:00:00+00:00 |
998 | 801 | Virginia Beach, VA | MCD43A4.A2018051.h11v05.006.2018060034837 | 0.0 | 2018-02-12 00:00:00+00:00 |
18 | 3035 | Washington, DC--VA--MD | MCD43A4.A2018072.h12v05.006.2018081140137 | 0.0 | 2018-03-05 00:00:00+00:00 |
uac_least_cloudy.columns
Index(['index', 'UACE10', 'GEOID10', 'NAME10', 'NAMELSAD10', 'LSAD10', 'MTFCC10', 'UATYP10', 'FUNCSTAT10', 'ALAND10', 'AWATER10', 'INTPTLAT10', 'INTPTLON10', 'geometry', 'index_right', 'eod_collection_attribution', 'eod_collection_display_name', 'eod_collection_family', 'eod_collection_family_display_name', 'eod_epsg4326_geometry_simplified', 'eod_grid_id', 'eod_item_attribution', 'eod_item_family', 'created', 'datetime', 'eo_cloud_cover', 'eo_gsd', 'eo_instrument', 'gsd', 'license', 'proj_crs', 'proj_geometry', 'updated', 'B06qa', 'B01', 'B05', 'B02', 'B01qa', 'B06', 'B02qa', 'B03qa', 'B03', 'B04qa', 'eod_thumbnail', 'B07qa', 'B05qa', 'B04', 'B07', 'self_link', 'preview_link', 'bundle_link', 'fullres_link', 'maplayer_link', 'maplayer-zxy_link', 'leaflet_link', 'statistics_link', 'tileinfo_link', 'esri-tile-layer_link', 'license_link', 'collection', 'id'], dtype='object')
Read the Raster Data
We will read the short-wave infrared (~1.6μm) and near-infrared from MODIS MCD43A4. These are bands 6 and 2 respectively. We can find this out from the earth_ondemand.item_assets
function.
Note the renaming we do. This allows us to forget about the specific band designations for the rest of the code. This is a good idea if we want to revisit a similar analysis with a different collection.
earth_ondemand.item_assets('mcd43a4')
asset_name | bundleable | eo_gsd | gsd | roles | title | type | collection_id | eo_bands_count | eo_bands_common_names | |
---|---|---|---|---|---|---|---|---|---|---|
0 | B06qa | True | 500.0 | 500.0 | [qa] | Band 6 - QA | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | NaN | NaN |
1 | B01 | True | 500.0 | 500.0 | [data] | Band 1 - Red - 620-670nm (500m) | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | 1.0 | red |
2 | B05 | True | 500.0 | 500.0 | [data] | Band 5 - SWIR - 1230-1250nm (500m) | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | 1.0 | |
3 | B02 | True | 500.0 | 500.0 | [data] | Band 2 - NIR - 841-876nm (500m) | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | 1.0 | nir |
4 | B01qa | True | 500.0 | 500.0 | [qa] | Band 1 - QA | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | NaN | NaN |
5 | B06 | True | 500.0 | 500.0 | [data] | Band 6 - SWIR - 1628-1652nm (500m) | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | 1.0 | swir16 |
6 | B02qa | True | 500.0 | 500.0 | [qa] | Band 2 - QA | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | NaN | NaN |
7 | B03qa | True | 500.0 | 500.0 | [qa] | Band 3 - QA | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | NaN | NaN |
8 | B03 | True | 500.0 | 500.0 | [data] | Band 3 - Blue - 459-479nm (500m) | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | 1.0 | blue |
9 | B04qa | True | 500.0 | 500.0 | [qa] | Band 4 - QA | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | NaN | NaN |
10 | eod_thumbnail | False | NaN | NaN | [thumbnail] | Thumbnail | image/jpeg | mcd43a4 | NaN | NaN |
11 | B07qa | True | 500.0 | 500.0 | [qa] | Band 7 - QA | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | NaN | NaN |
12 | B05qa | True | 500.0 | 500.0 | [qa] | Band 5 - QA | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | NaN | NaN |
13 | B04 | True | 500.0 | 500.0 | [data] | Band 4 - Green - 545-565nm (500m) | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | 1.0 | green |
14 | B07 | True | 500.0 | 500.0 | [data] | Band 7 - SWIR - 2105-2155nm (500m) | image/tiff; application=geotiff; profile=cloud-optimized | mcd43a4 | 1.0 | swir22 |
rf = spark.read.raster(uac_least_cloudy, catalog_col_names=['B06', 'B02']) \ .withColumnRenamed('B06', 'swir16') \ .withColumnRenamed('B02', 'nir')
Create a new column reprojecting the city polygon to the same CRS as the imagery. Filter so we remove any rows where the image does not cover the city. We will also apply a very simple filter to remove fill
values from the Landsat imagery. Note that our cloud cover is low, so we expect otherwise quite clean images.
rf = rf.withColumn('geo_native', st_reproject('geometry', rf_mk_crs(str(uac_50.crs)), rf_crs('swir16'))) \ .filter(st_intersects(rf_geometry('swir16'), 'geo_native'))
Take a look at a sample of the data.
rf.select('swir16', 'nir', 'NAME10', st_centroid('geometry'), st_centroid(rf_geometry('swir16')))
swir16 | nir | NAME10 | st_centroid(geometry) | st_centroid(rf_geometry) |
---|---|---|---|---|
![]() |
![]() |
Portland, OR--WA | POINT (-122.65108829306516 45.5202364919... | POINT (-9473818.42755984 5144624.4043243... |
![]() |
![]() |
Portland, OR--WA | POINT (-122.65108829306516 45.5202364919... | POINT (-9592426.482990984 5026016.348893... |
![]() |
![]() |
Portland, OR--WA | POINT (-122.65108829306516 45.5202364919... | POINT (-9473818.42755984 5026016.3488933... |
![]() |
![]() |
Miami, FL | POINT (-80.23175025699743 26.17748297221... | POINT (-8006043.7416002005 3039331.42042... |
![]() |
![]() |
Miami, FL | POINT (-80.23175025699743 26.17748297221... | POINT (-7887435.68616916 3039331.4204221... |
Analysis
Burn-in the City Geometry
We will create a new Tile aligned to the existing raster data that "burns in" the city polygon. This is discussed more under zonal stats on the RasterFrames docs. The cell below is going to work through the steps leaving the explanation to those docs.
rf = rf.withColumn('city_tile', rf_rasterize('geo_native', rf_geometry('swir16'), F.lit(1), rf_dimensions('swir16').cols, rf_dimensions('swir16').rows)) \ .filter(rf_data_cells('city_tile') > 0)
Now we will mask the imagery with the rasterized city polygons.
rf = rf.withColumn('swir16', rf_mask('swir16', 'city_tile')) \ .withColumn('nir', rf_mask('nir', 'city_tile'))
Look at a sample
rf.select('swir16', 'nir', 'city_tile', 'NAME10') \ .filter(rf_data_cells('city_tile') > 2000)
swir16 | nir | city_tile | NAME10 |
---|---|---|---|
![]() |
![]() |
![]() |
Portland, OR--WA |
![]() |
![]() |
![]() |
Miami, FL |
![]() |
![]() |
![]() |
Phoenix--Mesa, AZ |
![]() |
![]() |
![]() |
Phoenix--Mesa, AZ |
![]() |
![]() |
![]() |
Nashville-Davidson, TN |
city_ndbi = rf.select('NAME10', rf_normalized_difference('swir16', 'nir').alias('ndbi')) \ .groupBy('NAME10') \ .agg(rf_agg_stats('ndbi').alias('ndbi_stats')) \ .select(F.col('NAME10').alias('city'), F.col('ndbi_stats').mean.alias('ndbi_mean'), F.col('ndbi_stats').data_cells.alias('ndbi_count'))
city_ndbi_pd = city_ndbi.toPandas()
city_ndbi_pd.sort_values('ndbi_mean')
city | ndbi_mean | ndbi_count | |
---|---|---|---|
21 | Minneapolis--St. Paul, MN--WI | -0.621907 | 11396 |
36 | Boston, MA--NH--RI | -0.541301 | 9370 |
5 | San Juan, PR | -0.232493 | 8567 |
22 | Hartford, CT | -0.216226 | 5026 |
11 | Sacramento, CA | -0.151771 | 5760 |
32 | San Francisco--Oakland, CA | -0.132594 | 6043 |
13 | Portland, OR--WA | -0.126376 | 6431 |
14 | Providence, RI--MA | -0.124922 | 4002 |
15 | Seattle, WA | -0.122666 | 12865 |
1 | Tampa--St. Petersburg, FL | -0.087483 | 12182 |
49 | Orlando, FL | -0.083008 | 7625 |
17 | Houston, TX | -0.080372 | 16458 |
35 | Jacksonville, FL | -0.075250 | 7260 |
33 | Miami, FL | -0.070475 | 12737 |
4 | Los Angeles--Long Beach--Anaheim, CA | -0.062959 | 18263 |
48 | San Antonio, TX | -0.036391 | 7076 |
26 | San Diego, CA | -0.021014 | 9056 |
23 | Dallas--Fort Worth--Arlington, TX | -0.016608 | 15640 |
47 | Bridgeport--Stamford, CT--NY | -0.012538 | 4992 |
20 | Riverside--San Bernardino, CA | -0.006191 | 6329 |
42 | Phoenix--Mesa, AZ | -0.002439 | 13735 |
10 | Cleveland, OH | -0.001179 | 7229 |
9 | Las Vegas--Henderson, NV | -0.000806 | 3792 |
8 | Virginia Beach, VA | 0.000136 | 6929 |
19 | New York--Newark, NY--NJ--CT | 0.000932 | 1469 |
38 | Indianapolis, IN | 0.015442 | 7809 |
40 | Raleigh, NC | 0.018536 | 6267 |
27 | Detroit, MI | 0.021401 | 14781 |
0 | Richmond, VA | 0.024985 | 5955 |
46 | Austin, TX | 0.029407 | 124 |
43 | Louisville/Jefferson County, KY--IN | 0.034897 | 5738 |
25 | Knoxville, TN | 0.036066 | 5256 |
44 | Birmingham, AL | 0.036775 | 6419 |
2 | Cincinnati, OH--KY--IN | 0.037818 | 9503 |
6 | Charlotte, NC--SC | 0.039398 | 9209 |
7 | Columbus, OH | 0.039867 | 2676 |
39 | Philadelphia, PA--NJ--DE--MD | 0.042371 | 12789 |
24 | Nashville-Davidson, TN | 0.042855 | 3109 |
41 | Columbia, SC | 0.052459 | 4142 |
12 | Atlanta, GA | 0.062013 | 13738 |
30 | Baltimore, MD | 0.066063 | 8862 |
29 | Pittsburgh, PA | 0.069614 | 11112 |
3 | Washington, DC--VA--MD | 0.070776 | 7224 |
37 | Chicago, IL--IN | 0.073994 | 28213 |
18 | Memphis, TN--MS--AR | 0.081744 | 5997 |
16 | Milwaukee, WI | 0.083751 | 6708 |
45 | St. Louis, MO--IL | 0.101937 | 11127 |
28 | Kansas City, MO--KS | 0.121652 | 8152 |
34 | Denver--Aurora, CO | 0.135412 | 13 |
31 | Oklahoma City, OK | 0.146614 | 5047 |
_ = city_ndbi_pd.plot.scatter('ndbi_count', 'ndbi_mean')

This simple analysis could be improved by choosing more than just 1 scene per city. In some of the images above we see areas of missing data in the imagery that overlap with the city polygon.
But we now have the basic steps for joining the vector data and the Earth OnDemand catalog, then working with the geometry and imagery together.
Comments
0 comments
Please sign in to leave a comment.