Skip to content

Commit

Permalink
Merge pull request OSGeo#4020 from rouault/update_plscenesconf
Browse files Browse the repository at this point in the history
PLScenes: add PSScene and SkySatVideo item types to conf, and update other item types
  • Loading branch information
rouault authored Jun 21, 2021
2 parents 36aa932 + d826b74 commit a7d5db1
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 26 deletions.
9 changes: 5 additions & 4 deletions autotest/ogr/ogr_plscenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def test_ogr_plscenes_data_v1_nominal():
assert ext == (-180.0, 180.0, -90.0, 90.0)

field_count = lyr.GetLayerDefn().GetFieldCount()
assert field_count == 78
assert field_count == 106

# Regular /items/ fetching
gdal.FileFromMemBuffer("""/vsimem/data_v1/quick-search?_page_size=250&POSTFIELDS={"item_types":["PSOrthoTile"],"filter":{"type":"AndFilter","config":[]}}""",
Expand Down Expand Up @@ -517,7 +517,7 @@ def test_ogr_plscenes_data_v1_nominal():
for filename in fl:
gdal.Unlink(filename)


###############################################################################
# Test robustness to errors in Data V1 API

Expand Down Expand Up @@ -700,8 +700,9 @@ def test_ogr_plscenes_data_v1_live():

ds = None

ds = gdal.Open('PLScenes:version=data_v1,itemtypes=%s,scene=%s,asset=%s' % (catalog, scene, asset_name))
assert ds is not None
dsname = 'PLScenes:version=data_v1,itemtypes=%s,scene=%s,asset=%s' % (catalog, scene, asset_name)
ds = gdal.Open(dsname)
assert ds is not None, dsname
assert ds.RasterCount != 0


Expand Down
169 changes: 159 additions & 10 deletions gdal/data/plscenesconf.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@
{ "name": "ground_control", "type": "boolean" },
{ "name": "gsd", "type": "double" },
{ "name": "heavy_haze_percent", "type": "double" },
{ "name": "instrument", "type": "string" },
{ "name": "item_type", "type": "string" },
{ "name": "light_haze_percent", "type": "double" },
{ "name": "origin_x", "type": "double" },
{ "name": "origin_y", "type": "double" },
{ "name": "pixel_resolution", "type": "double" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "publishing_stage", "type": "string" },
{ "name": "quality_category", "type": "string" },
{ "name": "rows", "type": "int" },
{ "name": "satellite_azimuth", "type": "double" },
{ "name": "satellite_id", "type": "string" },
{ "name": "shadow_percent", "type": "double" },
{ "name": "snow_ice_percent", "type": "double" },
Expand All @@ -37,10 +41,14 @@
],
"assets": [
"analytic",
"analytic_5b",
"analytic_5b_xml",
"analytic_dn",
"analytic_dn_xml",
"analytic_sr",
"analytic_xml",
"udm",
"udm2",
"visual",
"visual_xml"
]
Expand Down Expand Up @@ -74,12 +82,64 @@
],
"assets": [
"analytic",
"analytic_sr",
"analytic_xml",
"udm",
"visual",
"visual_xml"
]
},
"PSScene" : {
"fields": [
{ "name": "acquired", "type": "datetime" },
{ "name": "anomalous_pixels", "type": "double" },
{ "name": "clear_confidence_percent", "type": "double" },
{ "name": "clear_percent", "type": "double" },
{ "name": "cloud_cover", "type": "double" },
{ "name": "cloud_percent", "type": "double" },
{ "name": "epsg_code", "type": "int" },
{ "name": "ground_control", "type": "boolean" },
{ "name": "gsd", "type": "double" },
{ "name": "heavy_haze_percent", "type": "double" },
{ "name": "instrument", "type": "string" },
{ "name": "item_type", "type": "string" },
{ "name": "light_haze_percent", "type": "double" },
{ "name": "pixel_resolution", "type": "double" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "publishing_stage", "type": "string" },
{ "name": "quality_category", "type": "string" },
{ "name": "rows", "type": "int" },
{ "name": "satellite_azimuth", "type": "double" },
{ "name": "satellite_id", "type": "string" },
{ "name": "shadow_percent", "type": "double" },
{ "name": "snow_ice_percent", "type": "double" },
{ "name": "strip_id", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
{ "name": "sun_elevation", "type": "double" },
{ "name": "updated", "type": "datetime" },
{ "name": "usable_data", "type": "double" },
{ "name": "view_angle", "type": "double" },
{ "name": "visible_confidence_percent", "type": "double" },
{ "name": "visible_percent", "type": "double" }
],
"assets": [
"ortho_analytic_4b",
"ortho_analytic_8b",
"ortho_analytic_8b_sr",
"ortho_analytic_8b_xml",
"ortho_analytic_4b_sr",
"ortho_analytic_4b_xml",
"basic_analytic_4b",
"basic_analytic_8b",
"basic_analytic_8b_xml",
"basic_analytic_4b_rpc",
"basic_analytic_4b_xml",
"basic_udm2",
"ortho_udm2",
"ortho_visual"
]
},
"PSScene3Band" : {
"fields": [
{ "name": "acquired", "type": "datetime" },
Expand All @@ -96,8 +156,10 @@
{ "name": "pixel_resolution", "type": "double" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "publishing_stage", "type": "string" },
{ "name": "quality_category", "type": "string" },
{ "name": "rows", "type": "int" },
{ "name": "satellite_azimuth", "type": "double" },
{ "name": "satellite_id", "type": "string" },
{ "name": "strip_id", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
Expand All @@ -118,7 +180,9 @@
"basic_analytic_rpc",
"basic_analytic_xml",
"basic_udm",
"basic_udm2",
"udm",
"udm2",
"visual",
"visual_xml"
]
Expand All @@ -127,27 +191,38 @@
"fields": [
{ "name": "acquired", "type": "datetime" },
{ "name": "anomalous_pixels", "type": "double" },
{ "name": "clear_confidence_percent", "type": "int" },
{ "name": "clear_percent", "type": "int" },
{ "name": "cloud_cover", "type": "double" },
{ "name": "cloud_percent", "type": "int" },
{ "name": "columns", "type": "int" },
{ "name": "epsg_code", "type": "int" },
{ "name": "ground_control", "type": "boolean" },
{ "name": "gsd", "type": "double" },
{ "name": "heavy_haze_percent", "type": "int" },
{ "name": "instrument", "type": "string" },
{ "name": "item_type", "type": "string" },
{ "name": "light_haze_percent", "type": "int" },
{ "name": "origin_x", "type": "double" },
{ "name": "origin_y", "type": "double" },
{ "name": "pixel_resolution", "type": "double" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "publishing_stage", "type": "string" },
{ "name": "quality_category", "type": "string" },
{ "name": "rows", "type": "int" },
{ "name": "satellite_azimuth", "type": "double" },
{ "name": "satellite_id", "type": "string" },
{ "name": "shadow_percent", "type": "int" },
{ "name": "snow_ice_percent", "type": "int" },
{ "name": "strip_id", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
{ "name": "sun_elevation", "type": "double" },
{ "name": "updated", "type": "datetime" },
{ "name": "usable_data", "type": "double" },
{ "name": "view_angle", "type": "double" }
{ "name": "view_angle", "type": "double" },
{ "name": "visible_confidence_percent", "type": "int" },
{ "name": "visible_percent", "type": "int" }
],
"assets": [
"analytic",
Expand All @@ -167,7 +242,9 @@
"basic_analytic_xml",
"basic_analytic_xml_nitf",
"basic_udm",
"udm"
"basic_udm2",
"udm",
"udm2"
]
},
"REScene" : {
Expand Down Expand Up @@ -215,6 +292,7 @@
{ "name": "acquired", "type": "datetime" },
{ "name": "anomalous_pixels", "type": "double" },
{ "name": "cloud_cover", "type": "double" },
{ "name": "collection", "type": "int" },
{ "name": "columns", "type": "int" },
{ "name": "data_type", "type": "string" },
{ "name": "epsg_code", "type": "int" },
Expand All @@ -224,6 +302,8 @@
{ "name": "origin_x", "type": "double" },
{ "name": "origin_y", "type": "double" },
{ "name": "pixel_resolution", "type": "double" },
{ "name": "processed", "type": "datetime" },
{ "name": "product_id", "type": "string" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "quality_category", "type": "string" },
Expand Down Expand Up @@ -302,68 +382,137 @@
"analytic_b10",
"analytic_b11",
"analytic_b12",
"metadata_aux"
"metadata_aux",
"visual"
]
},
"SkySatScene" : {
"fields": [
{ "name": "acquired", "type": "datetime" },
{ "name": "anomalous_pixels", "type": "double" },
{ "name": "camera_id", "type": "string" },
{ "name": "clear_confidence_percent", "type": "int" },
{ "name": "clear_percent", "type": "int" },
{ "name": "cloud_cover", "type": "double" },
{ "name": "cloud_percent", "type": "int" },
{ "name": "ground_control", "type": "boolean" },
{ "name": "gsd", "type": "double" },
{ "name": "heavy_haze_percent", "type": "int" },
{ "name": "item_type", "type": "string" },
{ "name": "light_haze_percent", "type": "int" },
{ "name": "pixel_resolution", "type": "double" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "publishing_stage", "type": "string" },
{ "name": "quality_category", "type": "string" },
{ "name": "satellite_id", "type": "string" },
{ "name": "satellite_azimuth", "type": "double" },
{ "name": "shadow_percent", "type": "int" },
{ "name": "snow_ice_percent", "type": "int" },
{ "name": "strip_id", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
{ "name": "sun_elevation", "type": "double" },
{ "name": "updated", "type": "datetime" },
{ "name": "view_angle", "type": "double" }
{ "name": "view_angle", "type": "double" },
{ "name": "visible_confidence_percent", "type": "int" },
{ "name": "visible_percent", "type": "int" }
],
"assets": [
"basic_analytic",
"basic_analytic_dn",
"basic_analytic_dn_rpc",
"basic_analytic_rpc",
"basic_analytic_udm",
"basic_analytic_udm2",
"basic_l1a_panchromatic_dn",
"basic_l1a_panchromatic_dn_rpc",
"basic_panchromatic",
"basic_panchromatic_dn",
"basic_panchromatic_dn_rpc",
"basic_udm",
"basic_panchromatic_rpc",
"basic_panchromatic_udm2",
"ortho_analytic",
"ortho_analytic_sr",
"ortho_analytic_dn",
"ortho_analytic_udm",
"ortho_visual",
"ortho_analytic_udm2",
"ortho_panchromatic",
"ortho_panchromatic_dn",
"ortho_panchromatic_udm",
"ortho_panchromatic_udm2",
"ortho_pansharpened",
"ortho_pansharpened_udm"
"ortho_pansharpened_udm",
"ortho_pansharpened_udm2",
"ortho_visual"
]
},
"SkySatCollect" : {
"fields": [
{ "name": "acquired", "type": "datetime" },
{ "name": "clear_confidence_percent", "type": "int" },
{ "name": "clear_percent", "type": "int" },
{ "name": "cloud_cover", "type": "double" },
{ "name": "cloud_percent", "type": "int" },
{ "name": "ground_control_ratio", "type": "double" },
{ "name": "gsd", "type": "double" },
{ "name": "heavy_haze_percent", "type": "int" },
{ "name": "item_type", "type": "string" },
{ "name": "light_haze_percent", "type": "int" },
{ "name": "pixel_resolution", "type": "double" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "publishing_stage", "type": "string" },
{ "name": "quality_category", "type": "string" },
{ "name": "satellite_id", "type": "string" },
{ "name": "satellite_azimuth", "type": "double" },
{ "name": "shadow_percent", "type": "int" },
{ "name": "snow_ice_percent", "type": "int" },
{ "name": "strip_id", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
{ "name": "sun_elevation", "type": "double" },
{ "name": "updated", "type": "datetime" },
{ "name": "view_angle", "type": "double" }
{ "name": "view_angle", "type": "double" },
{ "name": "visible_confidence_percent", "type": "int" },
{ "name": "visible_percent", "type": "int" }
],
"assets": [
"basic_l1a_all_frames",
"ortho_analytic",
"ortho_analytic_sr",
"ortho_analytic_dn",
"ortho_analytic_udm",
"ortho_visual",
"ortho_analytic_udm2",
"ortho_panchromatic",
"ortho_panchromatic_dn",
"ortho_panchromatic_udm",
"ortho_panchromatic_udm2",
"ortho_pansharpened",
"ortho_pansharpened_udm"
"ortho_pansharpened_udm",
"ortho_pansharpened_udm2",
"ortho_visual"
]
},
"SkySatVideo" : {
"fields": [
{ "name": "acquired", "type": "datetime" },
{ "name": "camera_id", "type": "string" },
{ "name": "item_type", "type": "string" },
{ "name": "provider", "type": "string" },
{ "name": "published", "type": "datetime" },
{ "name": "publishing_stage", "type": "string" },
{ "name": "quality_category", "type": "string" },
{ "name": "satellite_azimuth", "type": "double" },
{ "name": "satellite_id", "type": "string" },
{ "name": "strip_id", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
{ "name": "sun_elevation", "type": "double" },
{ "name": "updated", "type": "datetime" },
{ "name": "view_angle", "type": "double" }
],
"assets": [
"video_file",
"video_frames",
"video_metadata"
]
},
"Sentinel1" : {
Expand Down
2 changes: 1 addition & 1 deletion gdal/doc/source/drivers/vector/plscenes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ See Also
--------

- `Documentation of Planet Scenes Data API
V1 <https://www.planet.com/docs/reference/data-api/>`__
V1 <https://developers.planet.com/docs/apis/data/>`__
- :ref:`Raster PLMosaic / Planet Mosaics API driver <raster.plmosaic>`
2 changes: 1 addition & 1 deletion gdal/doc/source/drivers/vector/plscenes_data_v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,5 @@ See Also
- :ref:`General documentation page for PLScenes
driver <vector.plscenes>`
- `Documentation of Planet Scenes Data API
v1 <https://developers.planet.com/docs/api/>`__
v1 <https://developers.planet.com/docs/apis/data/>`__
- :ref:`Raster PLMosaic / Planet Mosaics API driver <raster.plmosaic>`
Loading

0 comments on commit a7d5db1

Please sign in to comment.