ICESat-2 Python API

The ICESat-2 Python API icesat2.py is used to access the services provided by the sliderule-icesat2 plugin for SlideRule. From Python, the module can be imported via:

from sliderule import icesat2

Polygons

All polygons provided to the ICESat-2 module functions must be provided as a list of dictionaries containing longitudes and latitudes in counter-clockwise order with the first and last point matching.

For example:

region = [ {"lon": -108.3435200747503, "lat": 38.89102961045247},
           {"lon": -107.7677425431139, "lat": 38.90611184543033},
           {"lon": -107.7818591266989, "lat": 39.26613714985466},
           {"lon": -108.3605610678553, "lat": 39.25086131372244},
           {"lon": -108.3435200747503, "lat": 38.89102961045247} ]

In order to facilitate other formats, the icesat2.toregion function can be used to convert polygons from the GeoJSON and Shapefile formats to the format accepted by SlideRule.

Note that the maximum number of points in a polygon supported by SlideRule is 16384, and as the number of points in the polygon grows, the amount of time it takes to process grows as well. It is recommended for performance reasons that polygons are kept to fewer than 32 points. Use the icesat2.toregion function’s tolerance parameter to reduce the number of points in a provided shape.

Time

All times returned in result records are in number of seconds (fractual, double precision) since the ATLAS Standard Data Product (SDP) epoch which is January 1, 2018 at midnight (2018-01-01:T00.00.00.000000Z).

To convert ATLAS SDP time to standard GPS time, you need to add the number of seconds since the GPS epoch which is Junary 6, 2018 at midnight (1980-01-06T00:00:00.000000Z) from the ATLAS SDP epoch. That number is 1198800018 seconds.

The SlideRule Python client provides helper functions to perform the conversion. See gps2utc.

For APIs that return GeoDataFrames, the “time” column values are represented as a datatime with microsecond precision.

Parameters

When making a request to SlideRule to perform the ATL06-SR algorithm on segmented ATL03 data, there is a set of configurable parameters used by the algorithm to customize the processing performed and the results returned. Not all parameters need to be defined when making a request; there are reasonable defaults used for each parameter so that only those parameters that you want to customize need to be specified.

  • "poly": polygon defining region of interest (see polygons)

  • "srt": surface type: 0-land, 1-ocean, 2-sea ice, 3-land ice, 4-inland water

  • "cnf": confidence level for photon selection

  • "pass_invalid": true|false flag indicated whether or not extents that fail validation checks are still used and returned in the results

  • "atl08_class": list of ATL08 classifications used to select which photons are used in the processing (the available classifications are: “atl08_noise”, “atl08_ground”, “atl08_canopy”, “atl08_top_of_canopy”, “atl08_unclassified”)

  • "ats": minimum along track spread

  • "cnt": minimum photon count in segment

  • "len": length of ATL06 segment in meters

  • "res": step distance for successive ATL06 segments in meters

  • "maxi": maximum iterations, not including initial least-squares-fit selection

  • "H_min_win": minimum height of photon window in meters

  • "sigma_r_max": maximum robust dispersion in meters

  • "compact": return compact version of results (leaves out most metadata)

parms = {
    "cnf": 4,
    "ats": 20.0,
    "cnt": 10,
    "len": 40.0,
    "res": 20.0,
    "maxi": 1
}

Assets

When accessing SlideRule as a service, there are many times when you need to specify which source datasets it should use when processing the data. A source dataset is called an asset and is specified by its name as a string.

The asset name tells SlideRule where to get the data, and what format the data should be in. The following assets are supported by the ICESat-2 deployment of SlideRule:

asset

format

path

index

region

endpoint

nsidc-s3

cumulus

nsidc-cumulus-prod-protected

empty.index

us-west-2

https://s3.us-west-2.amazonaws.com

atlas-s3

s3

icesat2-sliderule/data/ATLAS

empty.index

us-west-2

https://s3.us-west-2.amazonaws.com

Elevations

The primary result returned by SlideRule for ICESat-2 processing requests is a set of gridden elevations corresponding to a geolocated ATL03 along-track segment. The elevations are contained in a GEoDataFrame where each row represents a calculated elevation.

Elements that are present in the compact version of the results are noted below.

The elevation GeoDataFrame has the following columns:

  • "segment_id": segment ID of first ATL03 segment in result

  • "n_fit_photons": number of photons used in final calculation

  • "pflags": processing flags (0x1 - spread too short; 0x2 - too few photons; 0x4 - max iterations reached)

  • "rgt": reference ground track

  • "cycle": cycle

  • "spot": laser spot 1 to 6

  • "gt": ground track (10: GT1L, 20: GT1R, 30: GT2L, 40: GT2R, 50: GT3L, 60: GT3R)

  • "delta_time": seconds from ATLAS Standard Product epoch (Jan 1, 2018) [in compact]

  • "lat": latitude (-90.0 to 90.0) [in compact]

  • "lon": longitude (-180.0 to 180.0) [in compact]

  • "h_mean": elevation in meters from ellipsoid [in compact]

  • "dh_fit_dx": along-track slope

  • "dh_fit_dy": across-track slope

  • "w_surface_window_final": width of the window used to select the final set of photons used in the calculation

  • "rms_misfit": measured error in the linear fit of the surface

  • "h_sigma": error estimate for the least squares fit model

>>> rsps = icesat2.atl06(parms, resource, asset, as_numpy=False)
>>> print(rsps["cycle"])
[1, 1, 1, ... 1]

Photon Segments

The primary input data processed by SlideRule for ICESat-2 processing requests is segmented ATL03 photon data. The photon data is stored as along-track segments inside the ATL03 granules, which is then broken apart by SlideRule and re-segmented according to processing parameters supplied at the time of the request. The new segments are called extents. When the length of an extent is 40 meters, and the step size is 20 meters, the extent matches the ATL06 segments.

Most of the time, the photon extents are kept internal to SlideRule and not returned to the user. But there are some APIs that do return raw photon extents for the user to process on their own. Even though this offloads processing on the server, the API calls can take longer since more data needs to be returned to the user, which can bottleneck over the network.

Photon extents are returned as GeoDataFrames where each row is a photon.

The photon extents GeoDataFrame has the following columns:

  • "track": reference pair track number (1, 2, 3)

  • "sc_orient": spacecraft orientation (0: backwards, 1: forwards)

  • "rgt": reference ground track

  • "cycle": cycle

  • "segment_id": segment ID of first ATL03 segment in result

  • "count": the number of photons in the segment

  • "delta_time": seconds from ATLAS Standard Data Product (SDP) epoch (Jan 1, 2018)

  • "latitude": latitude (-90.0 to 90.0)

  • "longitude": longitude (-180.0 to 180.0)

  • "distance": along track distance of the photon in meters (with respect to the center of the segment)

  • "height": height of the photon in meters

  • "info": the photon classification (0: noise, 1: ground, 2: canopy, 3: top of canopy, 4: unclassified)

Functions

init


icesat2.init(url, verbose=False, max_resources=DEFAULT_MAX_REQUESTED_RESOURCES, max_errors=3, loglevel=logging.CRITICAL)

Mainly a convenience function for initializing the underlying SlideRule module. Must be called before other ICESat-2 API calls. This function is the same as calling the underlying sliderule functions: set_url, set_verbose, set_max_errors, along with the local set_max_resources function.

Parameters
  • url (str) – the IP address or hostname of the SlideRule service (note, there is a special case where the url is provided as a list of strings instead of just a string; when a list is provided, the client hardcodes the set of servers that are used to process requests to the exact set provided; this is used for testing and for local installations and can be ignored by most users)

  • verbose (bool) – whether or not user level log messages received from SlideRule generate a Python log message (see sliderule.set_verbose)

  • max_errors (int) – the number of errors returned by a SlideRule server before the client drops it from the available server list

  • max_resources (int) – the maximum number of resources that are allowed to be processed in a single request

  • loglevel (int) – minimum severity of log message to output

Example:

>>> from sliderule import icesat2
>>> icesat2.init("my-sliderule-service.my-company.com", True)

set_max_resources


icesat2.set_max_resources(max_resources)

Sets the maximum allowed number of resources to be processed in one request. This is mainly provided as a sanity check for the user.

Parameters

max_resources (int) – the maximum number of resources that are allowed to be processed in a single request

Example:

>>> from sliderule import icesat2
>>> icesat2.set_max_resources(1000)

cmr


icesat2.cmr(polygon, time_start=None, time_end=None, version='003', short_name='ATL03')

Query the NASA Common Metadata Repository (CMR) for a list of data within temporal and spatial parameters

Parameters
  • polygon (list) –

    polygon defining region of interest (see polygons)

  • time_start (str) – starting time for query in format <year>-<month>-<day>T<hour>:<minute>:<second>Z

  • time_end (str) – ending time for query in format <year>-<month>-<day>T<hour>:<minute>:<second>Z

  • version (str) – dataset version as found in the NASA CMR Directory

  • short_name (str) –

    dataset short name as defined in the NASA CMR Directory

Returns

list of files (granules) for the dataset fitting the spatial and temporal parameters

Example:

>>> from sliderule import icesat2
>>> region = [ {"lon": -108.3435200747503, "lat": 38.89102961045247},
...            {"lon": -107.7677425431139, "lat": 38.90611184543033},
...            {"lon": -107.7818591266989, "lat": 39.26613714985466},
...            {"lon": -108.3605610678553, "lat": 39.25086131372244},
...            {"lon": -108.3435200747503, "lat": 38.89102961045247} ]
>>> granules = icesat2.cmr(region)
>>> granules
['ATL03_20181017222812_02950102_003_01.h5', 'ATL03_20181110092841_06530106_003_01.h5', ... 'ATL03_20201111102237_07370902_003_01.h5']

atl06


icesat2.atl06(parms, resource, asset=DEFAULT_ASSET, track=0)

Performs ATL06-SR processing on ATL03 data and returns gridded elevations

Parameters
  • parms (dict) –

    parameters used to configure ATL06-SR algorithm processing (see Parameters)

  • resource (str) – ATL03 HDF5 filename

  • asset (str) –

    data source asset (see Assets)

  • track (int) – reference pair track number (1, 2, 3, or 0 to include for all three)

Returns

GeoDataFrame of gridded elevations (see Elevations)

Example:

>>> from sliderule import icesat2
>>> icesat2.init("icesat2sliderule.org", True)
>>> parms = { "cnf": 4, "ats": 20.0, "cnt": 10, "len": 40.0, "res": 20.0, "maxi": 1 }
>>> resource = "ATL03_20181019065445_03150111_003_01.h5"
>>> atl03_asset = "atlas-local"
>>> rsps = icesat2.atl06(parms, resource, atl03_asset)
>>> rsps
        dh_fit_dx  w_surface_window_final  ...                       time                     geometry
0        0.000042               61.157661  ... 2018-10-19 06:54:46.104937  POINT (-63.82088 -79.00266)
1        0.002019               61.157683  ... 2018-10-19 06:54:46.467038  POINT (-63.82591 -79.00247)
2        0.001783               61.157678  ... 2018-10-19 06:54:46.107756  POINT (-63.82106 -79.00283)
3        0.000969               61.157666  ... 2018-10-19 06:54:46.469867  POINT (-63.82610 -79.00264)
4       -0.000801               61.157665  ... 2018-10-19 06:54:46.110574  POINT (-63.82124 -79.00301)
...           ...                     ...  ...                        ...                          ...
622407  -0.000970               61.157666  ... 2018-10-19 07:00:29.606632  POINT (135.57522 -78.98983)
622408   0.004620               61.157775  ... 2018-10-19 07:00:29.250312  POINT (135.57052 -78.98983)
622409  -0.001366               61.157671  ... 2018-10-19 07:00:29.609435  POINT (135.57504 -78.98966)
622410  -0.004041               61.157748  ... 2018-10-19 07:00:29.253123  POINT (135.57034 -78.98966)
622411  -0.000482               61.157663  ... 2018-10-19 07:00:29.612238  POINT (135.57485 -78.98948)

[622412 rows x 16 columns]

atl06p


icesat2.atl06p(parm, asset=DEFAULT_ASSET, track=0, max_workers=0, version='004', block=True)

Performs ATL06-SR processing in parallel on ATL03 data and returns gridded elevations. Unlike the atl06 function, this function does not take a resource as a parameter; instead it is expected that the parm argument includes a polygon which is used to fetch all available resources from the CMR system automatically.

Note, it is often the case that the list of resources (i.e. granules) returned by the CMR system includes granules that come close, but do not actually intersect the region of interest. This is due to geolocation margin added to all CMR ICESat-2 resources in order to account for the spacecraft off-pointing. The consequence is that SlideRule will return no data for some of the resources and issue a warning statement to that effect; this can be ignored and indicates no issue with the data processing.

Parameters
  • parms (dict) –

    parameters used to configure ATL06-SR algorithm processing (see Parameters)

  • asset (str) –

    data source asset (see Assets)

  • track (int) – reference pair track number (1, 2, 3, or 0 to include for all three)

  • max_workers (int) – the number of threads to use when making concurrent requests to SlideRule (when set to 0, the number of threads is automatically and optimally determined based on the number of SlideRule server nodes available)

  • version (str) – the version of the ATL03 data to use for processing

  • block (bool) – wait for results to finish before returning; if set to false, instead of returning elevations, this function returns a list of concurrent futures)

Returns

GeoDataFrame of gridded elevations (see Elevations)

atl03s


icesat2.atl03s(parm, resource, asset=DEFAULT_ASSET, track=0)

Subsets ATL03 data given the polygon and time range provided and returns segments of photons

Parameters
  • parms (dict) –

    parameters used to configure ATL03 subsetting (see Parameters)

  • resource (str) – ATL03 HDF5 filename

  • asset (str) –

    data source asset (see Assets)

  • track (int) – reference pair track number (1, 2, 3, or 0 to include for all three)

Returns

GeoDataFrame of ATL03 extents (see Photon Segments)

atl03sp


icesat2.atl03sp(parm, asset=DEFAULT_ASSET, track=0, max_workers=0, version='004', block=True)

Performs ATL03 subsetting in parallel on ATL03 data and returns photon segment data. Unlike the atl03s function, this function does not take a resource as a parameter; instead it is expected that the parm argument includes a polygon which is used to fetch all available resources from the CMR system automatically.

Note, it is often the case that the list of resources (i.e. granules) returned by the CMR system includes granules that come close, but do not actually intersect the region of interest. This is due to geolocation margin added to all CMR ICESat-2 resources in order to account for the spacecraft off-pointing. The consequence is that SlideRule will return no data for some of the resources and issue a warning statement to that effect; this can be ignored and indicates no issue with the data processing.

Parameters
  • parms (dict) –

    parameters used to configure ATL03 subsetting (see Parameters)

  • asset (str) –

    data source asset (see Assets)

  • track (int) – reference pair track number (1, 2, 3, or 0 to include for all three)

  • max_workers (int) – the number of threads to use when making concurrent requests to SlideRule (when set to 0, the number of threads is automatically and optimally determined based on the number of SlideRule server nodes available)

  • version (str) – the version of the ATL03 data to return

  • block (bool) – wait for results to finish before returning; if set to false, instead of returning photon segment data, this function returns a list of concurrent futures)

Returns

list of ATL03 segments (see Photon Segments)

h5


icesat2.h5(dataset, resource, asset=DEFAULT_ASSET, datatype=sliderule.datatypes["REAL"], col=0, startrow=0, numrows=ALL_ROWS)

Reads a dataset from an HDF5 file and returns the values of the dataset in a list

This function provides an easy way for locally run scripts to get direct access to HDF5 data stored in a cloud environment. But it should be noted that this method is not the most efficient way to access remote H5 data, as the data is accessed one dataset at a time. Future versions may provide the ability to read multiple datasets at once, but in the meantime, if the user finds themselves needing direct access to a lot of HDF5 data residing in the cloud, then use of the H5Coro Python package is recommended as it provides a native Python package for performant direct access to HDF5 data in the cloud.

One of the difficulties in reading HDF5 data directly from a Python script is converting format of the data as it is stored in the HDF5 to a data format that is easy to use in Python. The compromise that this function takes is that it allows the user to supply the desired data type of the returned data via the datatype parameter, and the function will then return a numpy array of values with that data type.

The data type is supplied as a sliderule.datatypes enumeration:

  • sliderule.datatypes["TEXT"]: return the data as a string of unconverted bytes

  • sliderule.datatypes["INTEGER"]: return the data as an array of integers

  • sliderule.datatypes["REAL"]: return the data as an array of double precision floating point numbers

  • sliderule.datatypes["DYNAMIC"]: return the data in the numpy data type that is the closest match to the data as it is stored in the HDF5 file

Parameters
  • dataset (str) – full path to dataset variable (e.g. /gt1r/geolocation/segment_ph_cnt)

  • resource (str) – HDF5 filename

  • asset (str) –

    data source asset (see Assets)

  • datatype (int) – the type of data the returned dataset list should be in (datasets that are naturally of a different type undergo a best effort conversion to the specified data type before being returned)

  • col (int) – the column to read from the dataset for a multi-dimensional dataset; if there are more than two dimensions, all remaining dimensions are flattened out when returned.

  • startrow (int) – the first row to start reading from in a multi-dimensional dataset (or starting element if there is only one dimension)

  • numrows (int) – the number of rows to read when reading from a multi-dimensional dataset (or number of elements if there is only one dimension); if ALL_ROWS selected, it will read from the startrow to the end of the dataset.

Returns

numpy array of dataset values

Example:

segments    = icesat2.h5("/gt1r/land_ice_segments/segment_id",  resource, asset)
heights     = icesat2.h5("/gt1r/land_ice_segments/h_li",        resource, asset)
latitudes   = icesat2.h5("/gt1r/land_ice_segments/latitude",    resource, asset)
longitudes  = icesat2.h5("/gt1r/land_ice_segments/longitude",   resource, asset)

df = pd.DataFrame(data=list(zip(heights, latitudes, longitudes)), index=segments, columns=["h_mean", "latitude", "longitude"])

h5p


icesat2.h5p(datasets, resource, asset=DEFAULT_ASSET)

Reads a list of datasets from an HDF5 file and returns the values of the dataset in a dictionary of lists.

This function is considerably faster than the icesat2.h5 function in that it not only reads the datasets in parallel on the server side, but also shares a file context between the reads so that portions of the file that need to be read multiple times do not result in multiple requests to S3.

For a full discussion of the data type conversion options, see h5.

Parameters
  • datasets (dict) – list of full paths to dataset variable (e.g. /gt1r/geolocation/segment_ph_cnt); see below for additional parameters that can be added to each dataset

  • resource (str) – HDF5 filename

  • asset (str) –

    data source asset (see Assets)

Returns

dictionary of numpy arrays of dataset values, where the keys are the dataset names

The datasets dictionary can optionally contain the following elements per entry:

Parameters
  • valtype (int) – the type of data the returned dataset list should be in (datasets that are naturally of a different type undergo a best effort conversion to the specified data type before being returned)

  • col (int) – the column to read from the dataset for a multi-dimensional dataset; if there are more than two dimensions, all remaining dimensions are flattened out when returned.

  • startrow (int) – the first row to start reading from in a multi-dimensional dataset (or starting element if there is only one dimension)

  • numrows (int) – the number of rows to read when reading from a multi-dimensional dataset (or number of elements if there is only one dimension); if ALL_ROWS selected, it will read from the startrow to the end of the dataset.

Example:

>>> from sliderule import icesat2
>>> icesat2.init(["127.0.0.1"], False)
>>> datasets = [
...         {"dataset": "/gt1l/land_ice_segments/h_li", "numrows": 5},
...         {"dataset": "/gt1r/land_ice_segments/h_li", "numrows": 5},
...         {"dataset": "/gt2l/land_ice_segments/h_li", "numrows": 5},
...         {"dataset": "/gt2r/land_ice_segments/h_li", "numrows": 5},
...         {"dataset": "/gt3l/land_ice_segments/h_li", "numrows": 5},
...         {"dataset": "/gt3r/land_ice_segments/h_li", "numrows": 5}
...     ]
>>> rsps = icesat2.h5p(datasets, "ATL06_20181019065445_03150111_003_01.h5", "atlas-local")
>>> print(rsps)
{'/gt2r/land_ice_segments/h_li': array([45.3146427 , 45.27640582, 45.23608027, 45.21131015, 45.15692304]),
 '/gt2l/land_ice_segments/h_li': array([45.35118977, 45.33535027, 45.27195617, 45.21816889, 45.18534204]),
 '/gt1l/land_ice_segments/h_li': array([45.68811156, 45.71368944, 45.74234326, 45.74614113, 45.79866465]),
 '/gt3l/land_ice_segments/h_li': array([45.29602321, 45.34764226, 45.31430979, 45.31471701, 45.30034622]),
 '/gt1r/land_ice_segments/h_li': array([45.72632446, 45.76512574, 45.76337375, 45.77102473, 45.81307948]),
 '/gt3r/land_ice_segments/h_li': array([45.14954134, 45.18970635, 45.16637644, 45.15235916, 45.17135806])}

toregion


icesat2.toregion(filename, tolerance=0.0)

Convert a GeoJSON representation of a set of geospatial regions into a set of lat,lon lists recognized by SlideRule

Parameters
  • filename (str) – file name of GeoJSON formatted regions of interest, file must have named with the .geojson suffix

  • tolerance (float) – tolerance used to simplify complex shapes so that the number of points is less than the limit (a tolerance of 0.001 typically works for most complex shapes)

Returns

a list of lists containing the regions of interest that can be used for the poly parameter in a processing request to SlideRule

Example:

from sliderule import icesat2

# Region of Interest #
region_filename = sys.argv[1]
regions = icesat2.toregion(region_filename)

# Configure SlideRule #
icesat2.init("icesat2sliderule.org", False)

# Build ATL06 Request #
parms = {
    "poly": regions[0],
    "srt": icesat2.SRT_LAND,
    "cnf": icesat2.CNF_SURFACE_HIGH,
    "ats": 10.0,
    "cnt": 10,
    "len": 40.0,
    "res": 20.0,
    "maxi": 1
}

# Get ATL06 Elevations
atl06 = icesat2.atl06p(parms)

get_version


icesat2.get_version()

Get the version information for the running servers and Python client

Endpoints

atl06


POST /source/atl06 <request payload>

Perform ATL06-SR processing on ATL03 data and return gridded elevations

Request Payload (application/json)

parameter

description

default

atl03-asset

data source (see Assets)

atlas-local

resource

ATL03 HDF5 filename

required

track

track number: 1, 2, 3, or 0 for all three tracks

0

parms

ATL06-SR algorithm processing configuration (see Parameters)

required

timeout

number of seconds to wait for first response

wait forever

HTTP Example

POST /source/atl06 HTTP/1.1
Host: my-sliderule-server:9081
Content-Length: 179

{"atl03-asset": "atlas-local", "resource": "ATL03_20181019065445_03150111_003_01.h5", "track": 0, "parms": {"cnf": 4, "ats": 20.0, "cnt": 10, "len": 40.0, "res": 20.0, "maxi": 1}}

Python Example

# Build ATL06 Parameters
parms = {
    "cnf": 4,
    "ats": 20.0,
    "cnt": 10,
    "len": 40.0,
    "res": 20.0,
    "maxi": 1
}

# Build ATL06 Request
rqst = {
    "atl03-asset" : "atlas-local",
    "resource": "ATL03_20181019065445_03150111_003_01.h5",
    "track": 0,
    "parms": parms
}

# Execute ATL06 Algorithm
rsps = sliderule.source("atl06", rqst, stream=True)

Response Payload (application/octet-stream)

Serialized stream of gridded elevations of type atl06rec. See De-serialization for a description of how to process binary response records.

atl03s


POST /source/atl03s <request payload>

Subset ATL03 data and return segments of photons

Request Payload (application/json)

parameter

description

default

atl03-asset

data source (see Assets)

atlas-local

resource

ATL03 HDF5 filename

required

track

track number: 1, 2, 3, or 0 for all three tracks

0

parms

ATL06-SR algorithm processing configuration (see Parameters)

required

timeout

number of seconds to wait for first response

wait forever

HTTP Example

POST /source/atl03s HTTP/1.1
Host: my-sliderule-server:9081
Content-Length: 134

{"atl03-asset": "atlas-local", "resource": "ATL03_20181019065445_03150111_003_01.h5", "track": 0, "parms": {"len": 40.0, "res": 20.0}}

Python Example

# Build ATL06 Parameters
parms = {
    "len": 40.0,
    "res": 20.0,
}

# Build ATL06 Request
rqst = {
    "atl03-asset" : "atlas-local",
    "resource": "ATL03_20181019065445_03150111_003_01.h5",
    "track": 0,
    "parms": parms
}

# Execute ATL06 Algorithm
rsps = sliderule.source("atl03s", rqst, stream=True)

Response Payload (application/octet-stream)

Serialized stream of photon segments of type atl03rec. See De-serialization for a description of how to process binary response records.

indexer


POST /source/indexer <request payload>

Return a set of meta-data index records for each ATL03 resource (i.e. H5 file) listed in the request. Index records are used to create local indexes of the resources available to be processed, which in turn support spatial and temporal queries. Note, while SlideRule supports native meta-data indexing, this feature is typically not used in favor of accessing the NASA CMR system directly.

Request Payload (application/json)

parameter

description

default

atl03-asset

data source (see Assets)

atlas-local

resources

List of ATL03 HDF5 filenames

required

timeout

number of seconds to wait for first response

wait forever

HTTP Example

POST /source/indexer HTTP/1.1
Host: my-sliderule-server:9081
Content-Length: 131

{"atl03-asset": "atlas-local", "resources": ["ATL03_20181019065445_03150111_003_01.h5", "ATL03_20190512123214_06760302_003_01.h5"]}

Python Example

# Build Indexer Request
rqst = {
    "atl03-asset" : "atlas-local",
    "resources": ["ATL03_20181019065445_03150111_003_01.h5", "ATL03_20190512123214_06760302_003_01.h5"],
}

# Execute ATL06 Algorithm
rsps = sliderule.source("indexer", rqst, stream=True)

Response Payload (application/octet-stream)

Serialized stream of ATL03 meta-data index records of type atl03rec.index. See De-serialization for a description of how to process binary response records.