Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Planet Data API results are different from Planet Explorer results #149

Open
arunasank opened this issue Sep 9, 2020 · 2 comments
Open

Comments

@arunasank
Copy link
Contributor

arunasank commented Sep 9, 2020

Hi, thanks for these resources! They have been really useful to me. I have a problem:

Issue

The Planet Data API does not work like the Planet Explorer when you filter for BOTH cloud_cover AND visible_percent. I am working with Sentinel data.

Filter

GeoJSON filter
{
  "filter": {
    "type": "AndFilter",
    "config": [{
      "type": "GeometryFilter",
      "field_name": "geometry",
      "config": {
        "type": "Polygon",
        "coordinates": [
          [
            [-126.4743, 71.7742],
            [-126.4743, 72.044],
            [-125.6473, 72.044],
            [-125.6473, 71.7742],
            [-126.4743, 71.7742]
          ]
        ]
      }
    }, {
      "type": "OrFilter",
      "config": [{
        "type": "AndFilter",
        "config": [{
          "type": "StringInFilter",
          "field_name": "item_type",
          "config": ["Sentinel2L1C"]
        }, {
          "type": "OrFilter",
          "config": [{
            "type": "RangeFilter",
            "field_name": "visible_percent",
            "config": {
              "gte": 100,
              "lte": 100
            }
          }, {
            "type": "AndFilter",
            "config": [{
              "type": "NotFilter",
              "config": {
                "type": "RangeFilter",
                "field_name": "visible_percent",
                "config": {
                  "gte": 0,
                  "lte": 100
                }
              }
            }, {
              "type": "RangeFilter",
              "field_name": "cloud_cover",
              "config": {
                "gte": 0,
                "lte": 0
              }
            }]
          }]
        }]
      }]
    }, {
      "type": "OrFilter",
      "config": [{
        "type": "DateRangeFilter",
        "field_name": "acquired",
        "config": {
          "gte": "2020-06-01T16:00:00.000Z",
          "lte": "2020-08-31T23:59:59.999Z"
        }
      }]
    }, {
      "type": "PermissionFilter",
      "config": ["assets:download"]
    }]
  },
  "item_types": ["Sentinel2L1C"]
}

Results from Explorer:

image

IDs:

Sentinel2L1C:S2B_MSIL1C_20200614T205029_N0209_R057_T09WWV_20200614T225007
Sentinel2L1C:S2B_MSIL1C_20200614T205029_N0209_R057_T09WXV_20200614T225007
Sentinel2L1C:S2B_MSIL1C_20200614T205029_N0209_R057_T10WDE_20200614T225007

Results from the API

IDs:

Sentinel2L1C:S2B_MSIL1C_20200827T202849_N0209_R114_T09XWA_20200827T223854
Sentinel2L1C:S2B_MSIL1C_20200823T205029_N0209_R057_T09WWV_20200823T225149
Sentinel2L1C:S2B_MSIL1C_20200820T204019_N0209_R014_T10WDE_20200820T211421
Sentinel2L1C:S2B_MSIL1C_20200820T204019_N0209_R014_T09WXV_20200820T211421
Sentinel2L1C:S2A_MSIL1C_20200811T210031_N0209_R100_T09XXA_20200812T005010
Sentinel2L1C:S2B_MSIL1C_20200731T204019_N0209_R014_T09WWV_20200731T222121
Sentinel2L1C:S2B_MSIL1C_20200725T201849_N0209_R071_T10XDF_20200725T220437
Sentinel2L1C:S2B_MSIL1C_20200725T201849_N0209_R071_T09XXA_20200725T220437
Sentinel2L1C:S2B_MSIL1C_20200615T201849_N0209_R071_T09XXA_20200615T221803
Sentinel2L1C:S2B_MSIL1C_20200615T201849_N0209_R071_T10WDE_20200615T221803
Sentinel2L1C:S2B_MSIL1C_20200615T201849_N0209_R071_T10XDF_20200615T221803
Sentinel2L1C:S2B_MSIL1C_20200615T201849_N0209_R071_T09WXV_20200615T221803
Sentinel2L1C:S2B_MSIL1C_20200614T205029_N0209_R057_T10WDE_20200614T225007
Sentinel2L1C:S2B_MSIL1C_20200614T205029_N0209_R057_T09WXV_20200614T225007
Sentinel2L1C:S2B_MSIL1C_20200614T205029_N0209_R057_T09WWV_20200614T225007
Sentinel2L1C:S2A_MSIL1C_20200612T210031_N0209_R100_T09WWV_20200613T004156
Sentinel2L1C:S2B_MSIL1C_20200605T201849_N0209_R071_T09WWV_20200605T221756

Debugging

On closer inspection of the results, I found that this is the result when the **visibility_percent is not taken into account**, i.e the results are as if the visibility_percent is between 0% and 100%, instead of equal to 100% alone.

What APIs does the Planet Explorer use that avoid this bug? Is it available for consumers to use as well?

@arunasank arunasank changed the title Planet Data API results different from Planet Explorer results Planet Data API results are different from Planet Explorer results Sep 9, 2020
@pandep92
Copy link

Hello Aruna,

The cloud_cover in explorer is actually "cloud_percent + heavy_haze_percent". Hence, the field is different from what is available in the API

@arunasank
Copy link
Contributor Author

arunasank commented Oct 11, 2020

Thanks for clarifying @pandep92!

  • Can this be exported to the API query shown on the explorer as well, so that API users who use the curl command from the Explorer get the same results as those querying the Explorer interface?
  • Also, the heavy_haze_percent does not seem to be available for Sentinel: https://developers.planet.com/docs/data/sentinel2l1c/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants