COPRS / rs-issues

This repository contains all the issues of the COPRS project (Scrum tickets, ivv bugs, epics ...)
2 stars 2 forks source link

[RS Core DISTRIBUTION] Add GeoFootprint properties #1070

Open Woljtek opened 1 year ago

Woljtek commented 1 year ago

User story description: "As a end user, I would like to do GeoFootprint queries so that I can filter query by geoJson footprint."

Note: The current prip field "footprint" fit to geojson [RFC7946]. It would seem that rename this field will cover the PRIP ICD update. To be confirmed by WERUM technical leader.

Definition of ready:

Acceptance criteria:

Note : Tests can be done directly on OPS plateform (see #1071 / #1072)

Definition of Done:

w-bc commented 1 year ago

Tested on Werum testing environment: curl -XGET "http://localhost:8080/odata/v1/Products?\$filter=contains(Name,'EW_GRDM_1A')%20or%20contains(Name,'WV_RAW__0C')&\$top=3"

{
  "@odata.context": "$metadata#Products",
  "value": [
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "d134b19e-9b46-4fa5-ad22-d88b058c0be9",
      "Name": "S1A_EW_GRDM_1ADH_20200120T190011_20200120T190119_030888_038B84_F52A.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 10952,
      "PublicationDate": "2023-09-05T11:21:19.358Z",
      "EvictionDate": "2023-09-12T11:21:19.358Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "4abd01c67a7dba1e66ca5ad478a26191",
          "ChecksumDate": "2023-09-05T11:21:19Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T19:00:11Z",
        "End": "2020-01-20T19:01:19.2Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -49.5689,
              -11.3875
            ],
            [
              -14.3129,
              -11.3875
            ],
            [
              -14.3129,
              -14.3875
            ],
            [
              -49.5689,
              -14.7051
            ],
            [
              -49.5689,
              -11.3875
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "7e22e1cf-46b6-4a0e-9bae-5123be590b5a",
      "Name": "S1A_EW_GRDM_1ADH_20200120T190111_20200120T190209_030888_038B84_142F.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 10955,
      "PublicationDate": "2023-09-05T11:21:53.467Z",
      "EvictionDate": "2023-09-12T11:21:53.467Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "6d56a5ac8583a1fa1b39cbb5ffc28a36",
          "ChecksumDate": "2023-09-05T11:21:53Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T19:01:11Z",
        "End": "2020-01-20T19:02:09Z"
      },
      "GeoFootprint": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              -75.3129,
              -11.3875
            ],
            [
              -45.3299,
              -11.3875
            ],
            [
              -45.3299,
              -14.6669
            ],
            [
              -75.3129,
              -14.937
            ],
            [
              -75.3129,
              -11.3875
            ]
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    },
    {
      "@odata.mediaContentType": "application/octet-stream",
      "Id": "e767fdfe-7c8a-466d-a6fc-fbc2472071a7",
      "Name": "S1A_WV_RAW__0CSV_20200120T114913_20200120T121043_030883_038B58_5E83.SAFE.zip",
      "Online": true,
      "ContentType": "application/octet-stream",
      "ContentLength": 3306,
      "PublicationDate": "2023-09-05T11:23:51.21Z",
      "EvictionDate": "2023-09-12T11:23:51.21Z",
      "OriginDate": "2023-09-05T11:13:00Z",
      "Checksum": [
        {
          "Algorithm": "MD5",
          "Value": "8d00766c59260c6045eabb24ab326365",
          "ChecksumDate": "2023-09-05T11:23:51Z"
        }
      ],
      "ProductionType": "systematic_production",
      "ContentDate": {
        "Start": "2020-01-20T11:49:13Z",
        "End": "2020-01-20T12:10:43Z"
      },
      "GeoFootprint": {
        "type": "LineString",
        "coordinates": [
          [
            38.0143,
            -2.1312
          ],
          [
            36.9218,
            3.0021
          ]
        ],
        "crs": {
          "type": "name",
          "properties": {
            "name": "EPSG:4326"
          }
        }
      }
    }
  ]
}
Woljtek commented 1 year ago

@w-fsi You asked during kick-off meeting is the new GeoFootprint should

In order to keep backward compatibility, we want to add GeoFootprint next footprint property

w-fsi commented 11 months ago

We should point out that this modification is not done within the elastic search index and not requiring a migration within the database. The value is formated when given out via the frontend. Both fields are existing there and provided in the format that was used in the past for backward compatibility.

Private Zenhub Image