PLScenes (Planet Labs Scenes), Data V1 API

GDAL/OGR >= 2.2

The driver supports read-only operations to list scenes and their metadata as a vector layer per item-types: "PSOrthoTile", "REOrthoTile", "PSScene3Band", "PSScene4Band", "REScene", "Landsat8L1G", "Sentinel2L1C". It can also access raster scenes.

Dataset name syntax

The minimal syntax to open a datasource is :
PLScenes:[options]

Additional optional parameters can be specified after the ':' sign. Currently the following one is supported :

If several parameters are specified, they must be separated by a comma.

Open options

The following open options are available :

Configuration options

The following configuration options are available :

Attributes

The layer field definition is built from the "plscensconf.json" file in the GDAL configuration. The links to downloadable products are in asset_XXXXX_location attributes where XXXXX is the asset category id, when they are active. Otherwise they should be activated by sending a POST request to the URL in the asset_XXXXX_activate_link attribute (what the raster driver does automatically)

Geometry

The footprint of each scene is reported as a MultiPolygon with a longitude/latitude WGS84 coordinate system (EPSG:4326).

Filtering

The driver will forward any spatial filter set with SetSpatialFilter() to the server. It also makes the same for simple attribute filters set with SetAttributeFilter(). Note that not all attributes support all comparison operators. Refer to comparator column in Metadata properties

Paging

Features are retrieved from the server by chunks of 250 by default (and this is the maximum value accepted by the server). This number can be altered with the PLSCENES_PAGE_SIZE configuration option.

Vector layer (scene metadata) examples

  • Listing all scenes available (with the rights of the account) :
    ogrinfo -ro -al "PLScenes:" -oo API_KEY=some_value
    
    or
    ogrinfo -ro -al "PLScenes:api_key=some_value"
    
    or
    ogrinfo -ro -al "PLScenes:" --config PL_API_KEY some_value
    

  • Listing all scenes available on PSOrthoTile item types, under a point of (lat,lon)=(40,-100) :
    ogrinfo -ro -al "PLScenes:" -oo API_KEY=some_value PSOrthoTile -spat -100 40 -100 40
    

  • Listing all scenes available within a bounding box (lat,lon)=(40,-100) to (lat,lon)=(39,-99)
    ogrinfo -ro -al "PLScenes:" -oo API_KEY=some_value -spat -100 40 -99 39
    

  • Listing all scenes available matching criteria :
    ogrinfo -ro -al "PLScenes:" -oo API_KEY=some_value PSOrthoTile -where "acquired >= '2015/03/26 00:00:00' AND cloud_cover < 10"
    

  • List all downloadable scenes:
    ogrinfo -ro -al -q "PLScenes:" -oo API_KEY=some_value PSOrthoTile -where "permissions='assets:download'"
    

    Raster access

    Scenes can be accessed as raster datasets, provided that the scene ID is specified with the 'scene' parameter / SCENE open option. The 'itemtypes' parameter / ITEMTYPES open option must also be specified. The asset type (visual, analytic, ...) can be specified with the 'asset' parameter / ASSET open option. The scene id is the content of the value of the 'id' field of the features.

    If the product is not already generated on the server, it will be activated, and the driver will wait for it to be available. The length of this retry can be configured with the ACTIVATION_TIMEOUT open option.

    Raster access examples

  • Displaying raster metadata :
    gdalinfo "PLScenes:scene=scene_id,itemtypes=itemypes,asset=analytic" -oo API_KEY=some_value
    
    or
    gdalinfo "PLScenes:" -oo API_KEY=some_value -oo ITEMTYPES=itemtypes -oo SCENE=scene_id -oo ASSET=analytic
    
  • Converting/downloading a whole file:
    gdal_translate "PLScenes:" -oo API_KEY=some_value -oo SCENE=scene_id \
                    -oo ITEMTYPES=itemtypes -oo ASSET=analytic -oo RANDOM_ACCESS=NO out.tif
    

    See Also