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

The value passed for parameter 'geometries' in process 'aggregate_spatial' is invalid: Invalid type #28

Open
dpabon opened this issue Nov 27, 2023 · 1 comment

Comments

@dpabon
Copy link

dpabon commented Nov 27, 2023

Hi @przell

I have been following the tutorial:

https://github.com/EO-College/cubes-and-clouds/blob/main/lectures/3.1_data_processing/exercises/_alternatives/31_data_processing_cdse.rmd

However, when I run start the job start_job(job =job) line 305

I got the error message:

HTTP 400 Bad Request.
• SERVER-ERROR: Batch job has not finished computing the results yet. Please try again later or contact our support.

Looking the OpenEO web editor it says:

OpenEO batch job failed: ProcessParameterInvalidException(status_code=400, code='ProcessParameterInvalid', message="The value passed for parameter 'geometries' in process 'aggregate_spatial' is invalid: Invalid type: <class 'list'> ([{'HYBAS_ID': 2090516090, 'NEXT_DOWN': 2090516950, 'NEXT_SINK': 2090012980, 'MAIN_BAS': 2090012980, 'DIST_SINK': 334.5, 'DIST_MAIN': 334.5, 'SUB_AREA': 419.1, 'UP_AREA': 419.2, 'PFAF_ID': 214040804, 'ENDO': 0, 'COAST': 0, 'ORDER': 3, 'SORT': 10988, 'geometry': {'type': 'Polygon', 'coordinates': [[[11.075, 46.7291666666667], [11.0725755479601, 46.7288133409288], [11.0690911187066, 46.7253533257379], [11.0482855902778, 46.7246466742622], [11.0420247395834, 46.7308763292101], [11.0416666666667, 46.7333333333334], [11.0381235758464, 46.7342424180773], [11.0375, 46.7458333333334], [11.0366492377387, 46.7491492377387], [11.030017428928, 46.7508507622613], [11.0285993787978, 46.7563771565755], [11.0255672878689, 46.7602895100912], [11.0244327121311, 46.7647104899089], [11.0214006212023, 46.7686228434245], [11.0208333333334, 46.7708333333334], [11.0242916531033, 46.7717207166884], [11.0255672878689, 46.7813771565755], [11.0327660454644, 46.7894561767578], [11.0339006212023, 46.7938771565755], [11.0369327121311, 46.7977895100912], [11.0380672878689, 46.8022104899089], [11.0425862630209, 46.8076290554471], [11.0522104899089, 46.8089006212023], [11.0602895100912, 46.8160993787978], [11.0647104899089, 46.8172339545356], [11.0686228434245, 46.8202660454644], [11.0730438232422, 46.8214006212023], [11.0779741075304, 46.8252217610677], [11.0797339545356, 46.8301038953993], [11.0712951660156, 46.8395745171441], [11.0744327121311, 46.8436228434245], [11.0755672878689, 46.8465799967448], [11.0714006212023, 46.8519561767578], [11.0702660454644, 46.8593214246962], [11.0827660454644, 46.8727895100912], [11.0840416802301, 46.8824459499783], [11.0897104899089, 46.8839006212023], [11.0999596489801, 46.8931969536676], [11.0964006212023, 46.8977895100912], [11.0952660454644, 46.9134372...

    +34s 292ms
    error

    ID: [1701087273752, 77738]

Thanks in advance for your help.

Cheers,
Daniel

@przell
Copy link
Collaborator

przell commented Nov 27, 2023

@dpabon, hi, thanks for checking! I can reproduce the error. It's related to how the catchment json file is loaded. I will look into this towards the end of the week.
Here an excerpt of the process graph at the critical process aggregate_spatial() how it produces the error (additional fields in the geometry that shouln't be there):

    "aggregate_spatial_UAFWG4939S": {
      "arguments": {
        "data": {
          "from_node": "merge_cubes_LSRUS5552C"
        },
        "geometries": [
          {
            "COAST": 0,
            "DIST_MAIN": 334.5,
            "DIST_SINK": 334.5,
            "ENDO": 0,
            "HYBAS_ID": 2090516090,
            "MAIN_BAS": 2090012980,
            "NEXT_DOWN": 2090516950,
            "NEXT_SINK": 2090012980,
            "ORDER": 3,
            "PFAF_ID": 214040804,
            "SORT": 10988,
            "SUB_AREA": 419.1,
            "UP_AREA": 419.2,
            "geometry": {
              "coordinates": [
                [
                  [
                    11.075,
                    46.72916666666669
                  ],
                  [
                    11.072575547960094,
                    46.728813340928845
                  ],
                  [
                    11.069091118706622,
                    46.72535332573787

This is how it should look (from an old batch job that I still had saved):

    "aggregate_spatial_ZOPGM1690B": {
      "arguments": {
        "data": {
          "from_node": "merge_cubes_TWGTK0367M"
        },
        "geometries": {
          "features": [
            {
              "geometry": {
                "coordinates": [
                  [
                    [
                      11.075,
                      46.72916666666669
                    ],
                    [
                      11.072575547960094,
                      46.728813340928845
                    ],

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