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

auto-polarization: apply only to specific collections #473

Closed
bossie opened this issue Jul 10, 2023 · 3 comments · Fixed by #481
Closed

auto-polarization: apply only to specific collections #473

bossie opened this issue Jul 10, 2023 · 3 comments · Fixed by #481
Assignees
Labels

Comments

@bossie
Copy link
Collaborator

bossie commented Jul 10, 2023

https://discuss.eodc.eu/t/sentinel1-card4l/614/2

Collections backed by SHub are eligible for auto-polarization only by virtue of having some of these bands: HH, HV, VV or VH.

This includes the SENTINEL1_CARD4L collection, but it doesn't support filtering by polarization at all.

{
"process_graph": {
  "loadcollection1": {
   "process_id": "load_collection",
   "arguments": {
    "id": "SENTINEL1_CARD4L",
    "spatial_extent": {
     "east": -7.4910933100804415,
     "north": 31.282295972564953,
     "south": 30.99347728214292,
     "west": -7.911120531989407
    },
    "temporal_extent": [
     "2022-05-01T00:00:00Z",
     "2022-05-31T00:00:00Z"
    ]
   }
  },
  "saveresult1": {
   "process_id": "save_result",
   "arguments": {
    "data": {
     "from_node": "loadcollection1"
    },
    "format": "GTIFF"
   },
   "result": true
  }
 }
}
File "/opt/venv/lib64/python3.8/site-packages/openeogeotrellis/layercatalog.py", line 527, in sentinel_hub_pyramid
    pyramid_factory.datacube_seq(projected_polygons_native_crs.polygons(),
  File "/opt/spark3_4_0/python/lib/py4j-0.10.9.7-src.zip/py4j/java_gateway.py", line 1322, in __call__
    return_value = get_return_value(
  File "/opt/spark3_4_0/python/lib/py4j-0.10.9.7-src.zip/py4j/protocol.py", line 326, in get_return_value
    raise Py4JJavaError(
py4j.protocol.Py4JJavaError: An error occurred while calling o1609.datacube_seq.
: org.openeo.geotrellissentinelhub.SentinelHubException: Sentinel Hub returned an error
response: HTTP/1.1 400 Bad Request with body: {"code":400,"description":"Querying is not supported on property 'polarization'. Possible properties are ."}
request: POST https://creodias.sentinel-hub.com/api/v1/catalog/1.0.0/search with (possibly abbreviated) body: 
{
  "datetime": "2022-05-01T00:00:00Z/2022-05-31T23:59:59.999999999Z",
  "collections": ["byoc-608bffb4-5012-4489-abec-71e134a7a609"],
  "filter": "polarization = 'DV'",
  "intersects": {"type":"Polygon","coordinates":[[[-7.911120531989407,30.99347728214292],[-7.911120531989407,31.282295972564953],[-7.4910933100804415,31.282295972564953],[-7.4910933100804415,30.99347728214292],[-7.911120531989407,30.99347728214292]]]},
  "limit": 100,
  "next": null
}
	at org.openeo.geotrellissentinelhub.SentinelHubException$.apply(SentinelHubException.scala:21)
	at org.openeo.geotrellissentinelhub.SentinelHubException$.apply(SentinelHubException.scala:8)
	at org.openeo.geotrellissentinelhub.DefaultCatalogApi.getFeatureCollectionPage$2(CatalogApi.scala:204)
	at org.openeo.geotrellissentinelhub.DefaultCatalogApi.getFeatures$1(CatalogApi.scala:212)
@bossie bossie added the bug label Jul 10, 2023
@bossie
Copy link
Collaborator Author

bossie commented Jul 14, 2023

Adding an "auto_polarization": true flag (defaults to false) in the "_vito"/"data_source" part of the appropriate collections should work but checking if "_vito"/"data_source"/"collection_id" == "sentinel-1-grd" is also an option.

@EmileSonneveld
Copy link
Contributor

@EmileSonneveld
Copy link
Contributor

This is deployed now on https://openeo-dev.vito.be The following proces_graph did give a successful result:

{
  "process_graph": {
    "loadcollection1": {
      "process_id": "load_collection",
      "arguments": {
        "bands": [
          "VV", "VH"
        ],
        "id": "SENTINEL1_CARD4L",
        "spatial_extent": {
          "west": 35.666439,
          "south": -6.23476,
          "east": 35.861576,
          "north": -6.075694
        },
        "temporal_extent": [
          "2022-02-01",
          "2023-08-01"
        ]
      },
      "result": true
    }
  }
}

EmileSonneveld added a commit that referenced this issue Aug 15, 2023
…pensearch client instead of URL. Log missing products. #473
@EmileSonneveld EmileSonneveld linked a pull request Aug 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants