Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

When Earthdata Login is required for EGI access, EGI requests with very long URLs, for example, those using large shapefiles, can fail if your client program (e.g. curl, wget) has not already logged in and established a session. This is a due to the nature of the OAuth2 authentication process when credentials must be provided.  In In this case, it is easy to establish a session prior to sending your request simply by sending an empty request as follows:

...

Code Block
> curl -nL -b ~/.cookies -c ~/.cookies 'https://<host>/egi/request' -o /dev/null


If a session has not already been established, this will force curl to provide credentials to Earthdata Login and then save the session cookie. Subsequent requests will submit the session cookie and thus avoid the need for further authentication until the session expires. Session expiration is specific to each EGI instance but in most cases should be at least a few hours.

...

Note: The use of CMR tokens eliminates the need to authenticate via Earthdata Login, so the same URL length limitations do not existsexist



Anchor
programmaticaccessparameters
programmaticaccessparameters
Programmatic Access Parameters

...

Coverage=/group/sub-group/sub-sub-group/dataset

WCS: Used to specify the coverage to be processed. Specifies the subset data layer or group for Parameter Subsetting. Multiple datasets can be specified separated by commas. 

The dataset value always starts with a slash and the group-subgroup hierarchy are separated with slashes. If only a group or subgroup is specified, all lower level datasets are included in the processing. 

Bbox=<W>,<S>,<E>,<N>

WCS: Bounding Box used for spatial subsetting. Coordinates are in decimal degrees. This is the same order as used for the CMR spatial filter (Bounding_box) parameter

Time=<start_datetime>,<end_datetime>

WCS Keyword: Specify data datetime range filter for the CMR query. 
Note, the Time keyword is a shared CMR/egi keyword that also invokes temporal subsetting/stitching for applicable data sets.

WCS: Used for Temporal subsetting.
Note: The Time keyword also is used as a CMR temporal filter.

SUBSET=time("<datetime>")
SUBSET=lat(<min>,<max>)
SUBSET=lon(<min>,<max>)
SUBSET=x(<min>,<max>)
SUBSET=y(<min>,<max>)

WCS: SUBSET=time("<datetime>") is used for Temporal subsetting with the datetime as the specified start time.

WCS: Minimum and Maximum values to be used for the Bounding Box for spatial subsetting. Coordinates are in decimal degrees(lat/lon) or in meters(x/y).


Format=<format>

WCS: Optional output file format specifier used for re-formatting. Supported values vary by data type.
[GeoTIFF, HDF-EOS5, NetCDF4-CF, NetCDF-3, ASCII, HDF-EOS, KML, Shapefile, TABULAR_ASCII] 
If this parameter is not used, then the output format is the same as the input format (no reformatting).

BoundingShape=<GeoJSON content> or <"CMR-like" coordinate pairs>

Optional, used for polygon subsetting. 
GeoJSON content string or "CMR-like" coordinate pairs (BoundingShape=lon1,lat1,lon2,lat2,...lonx,latx,lon1,lat1)
Note: When drawing a polygon that crosses Anti-Meridian, need to redefine negative longitude values to > 180, vise versa, positive longitude values to < -180 in order for it to render correctly and for ogre to convert it correctly to geojson format.

shapefile=@<KML/Shapefile>Optional, used for polygon subsetting. 
[KML, Shapefile] 
Note: When drawing a polygon that crosses Anti-Meridian, need to redefine negative longitude values to > 180, vise versa, positive longitude values to < -180 in order for it to render correctly and for ogre to convert it correctly to geojson format.
EMAILSpecifies the email address to which any notifications will be sent. The special values yes and true are used to indicate that the email address should be obtained from the Earthdata Login user profile for the user submitting the request. These special values can only be used if the EGI is configured behind EDL and user credentials are provided OR a CMR token is submitted with the request.
FILE_IDS=<granule_id> | <granule_UR>Use of the FILE_IDS parameter will bypass CMR for the granule search and directly call EGI services using the SDPS granule id or granule UR (SC:<ESDT shortname>.<version_id>:<granule_id>)

...

Code Block
curl -s -O -J -w “%{http_code}\n%{url_effective}\n%{redirect_url}\n%{filename_effective}\n” \
    -nL -b ~/.cookies -c ~/.cookies \
    –dump-header response-header.txt \
    -F "shapefile=@new_crossing.zip" \
    "https://n5eil02u.ecs.nsidc.org/egi/requestshortrequest?short_name=ATL06 \
    &version=001 \
    &FILE_IDS=158875 \
    &Subset_Data_Layers=/gt1l/land_ice_height \
    &Format=Shapefile"

...

Code Block
pa.sh short_name=ATL03 \  
    version=001 \  
    Subset_Data_Layers=/gt1l \
    BoundingShape={"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"Name":null,"description":null,"timestamp":null,"begin":null,"end":null,"altitudeMode":"clampToGround","tessellate":-1,"extrude":0,"visibility":-1,"drawOrder":null,"icon":null},"geometry":{"type":"Polygon","coordinates":[[[-147.25640727423652,52.95206360966622],[-145.9181782282926,53.93605555521322],[-143.83211530373293,54.05413458867886],[-142.9268427138297,52.991423287488104],[-142.5332459356109,51.968071664119215],[-144.18635240412988,48.504420015793755],[-144.3044314375955,46.61515548034351],[-143.63531691462353,45.19820707875582],[-141.43117495659826,43.93869738845565],[-139.3844717098605,42.99406512073053],[-139.58127009896987,41.57711671914284],[-143.43851852551416,39.215536049830035],[-147.25640727423652,52.95206360966622]]]}}]} \
    Format=Shapefile

Anchor
scenario10
scenario10
Scenario 10 SMAP SPL4SMAU V005 Polygon Subset - "CMR-like" coordinate pairs

Code Block
languagebash
curl -s -O -J -w “%{http_code}\n%{url_effective}\n%{redirect_url}\n%{filename_effective}\n” \
    -nL -b ~/.cookies -c ~/.cookies \
    –dump-header response-header.txt \
    "https://n5eil02u.ecs.nsidc.org/egi_TS1/request? \
    short_name=SPL4SMAU \
    &BoundingShape=2.95313,43.37738,-9,43.37738,-8.57813,39.99999,-9,38.02984,-8.71875,36.48187,-6.1875,36.90405,-4.92188,36.0597,-3.375,37.1855,-0.28125,37.32622,0.5625,39.71854,2.39063,41.12579,3.51563,42.81448,6.60938,42.95521,9.5625,43.23666,8.29688,54.21318,3.375,51.82086,0.70313,49.99144,-5.20313,48.30274,-1.40625,45.62898,-2.95313,43.37738 \
    &version=005 \
    &Subset_Data_Layers=/SPL4SMAU/Forecast_Data/surface_temp_forecast \
    &format=GeoTIFF \
    &subagent_id=HEG"
https://n5eil12u.ecs.nsidc.org/egi_TS1/request?short_name=SPL4SMAU&version=004&FILE_IDS=9215717&format=GeoTIFF&Coverage=/Forecast_Data/surface_temp_forecast&boundingshape=2.95313,43.37738,-9,43.37738,-8.57813,39.99999,-9,38.02984,-8.71875,36.48187,-6.1875,36.90405,-4.92188,36.0597,-3.375,37.1855,-0.28125,37.32622,0.5625,39.71854,2.39063,41.12579,3.51563,42.81448,6.60938,42.95521,9.5625,43.23666,8.29688,54.21318,3.375,51.82086,0.70313,49.99144,-5.20313,48.30274,-1.40625,45.62898,-2.95313,43.37738&REQUEST_MODE=async&email=afitzger@nsidc.org


Anchor
retrievingrequestresults
retrievingrequestresults
Retrieving Request Results 

...