Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Connect EASI WPS with Terria #133

Open
mpaget opened this issue Nov 22, 2022 · 8 comments
Open

Connect EASI WPS with Terria #133

mpaget opened this issue Nov 22, 2022 · 8 comments

Comments

@mpaget
Copy link
Contributor

mpaget commented Nov 22, 2022

We're presently developing/configuring/deploying a datacube-wps service (uses pywps), see https://github.com/csiro-easi/datacube-wps. For RappMap we expect this will replace GSKY. Will be in touch when its ready for testing with Terria (Dec 2022 or Jan 2023).

Related to:

@mpaget mpaget changed the title Connect EASI WPS with Terra Connect EASI WPS with Terria Nov 23, 2022
@mpaget
Copy link
Contributor Author

mpaget commented Dec 5, 2022

Hi Terria team,
Can you point @haotanggg and I at the query and receiving formats (headers and data structures) for WPS calls from/to Terria, please? This will help us test and develop the service at our end. We're making progress....
Cheers!

@AnaBelgun
Copy link
Member

Hi @mpaget have you tried this https://docs.terria.io/guide/connecting-to-data/catalog-type-details/wps/

@mpaget
Copy link
Contributor Author

mpaget commented Dec 6, 2022

Thank you @AnaBelgun. We'll take a look and get back to you with any questions.

@haotanggg
Copy link

Hi @AnaBelgun,

I'm trying to get datacube-wps to return a timeseries CSV to Terria for Terria to render. This is the error we're getting on our local Terria instance. Can you please confirm whether there is any specific WPS-CSV handling in the GeoRAPP instance of Terria vs the default/quickstart local Terria. As far as we can tell, the response XML has the same structure (nesting, keys etc.)

error_upserting_json

@AnaBelgun
Copy link
Member

@na9da or @mwu2018 would you please help @haotanggg figure this out?

@na9da
Copy link
Contributor

na9da commented Apr 6, 2023

Hi @haotanggg - In your terriajs catalog definition, could you try setting forceConvertResultsToV8 to true?

From the error message, it looks like the service is returning the a terriajs-v7 JSON response. The above setting instructs terria to convert it to the newer terriajs-v8 JSON.

@mpaget
Copy link
Contributor Author

mpaget commented Apr 6, 2023

Hi @na9da - Can you provide details for the terriajs-v8 JSON format too, please?

@na9da
Copy link
Contributor

na9da commented Apr 6, 2023

Hi @mpaget

The v7 JSON response looks something like the following:

{
  "data": "<-- actual csv content -->",
  "isEnabled": true,
  "type": "csv",
  "name": "0968",
  "tableStyle": {
    "columns": {
      "pixel_frac": {
        "units": "%",
        "chartLineColor": "#FFFFFF",
        "yAxisMin": 0,
        "yAxisMax": 100,
        "active": true
      }
    }
  }
}

which when converted to v8 becomes:

{
  "type": "csv",
  "name": "0968",
  "csvString": "<-- the csv content that used to be previously set in `data` -->",
  "columns": [
    {
      "name": "pixel_frac",
      "units": "%"
    }
  ],
  "defaultStyle": {
    "chart": {
      "lines": [
        {
          "color": "#FFFFFF",
          "yAxisMinimum": 0,
          "yAxisMaximum": 100,
          "isSelectedInWorkbench": true,
          "yAxisColumn": "pixel_frac"
        }
      ]
    }
  }
}

There is some documentation on the v8 properties available for CSV type here.

Please do let me know if you need more help with it.

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

No branches or pull requests

4 participants