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

spring-driver removes null parameters in process graph #56

Open
clausmichele opened this issue Feb 17, 2022 · 0 comments
Open

spring-driver removes null parameters in process graph #56

clausmichele opened this issue Feb 17, 2022 · 0 comments

Comments

@clausmichele
Copy link
Member

The process graph sent by the Web Editor is the following:

{
  "parameters": [],
  "process_graph": {
    "1": {
      "process_id": "load_collection",
      "arguments": {
        "temporal_extent": [
          "2000-02-25T23:59:00Z",
          "2020-11-11T23:59:00Z"
        ],
        "spatial_extent": {
          "east": 18.990556343370127,
          "south": 42.28250560234868,
          "north": 48.77837603135202,
          "west": 3.5446677656937715
        },
        "id": "ADO_NDVI_MODIS_231m_3035_ODC"
      },
      "result": true
    },
    "3": {
      "process_id": "save_result",
      "arguments": {
        "data": {
          "from_node": "4"
        },
        "format": "JSON"
      }
    },
    "4": {
      "process_id": "vector_to_random_points",
      "arguments": {
        "data": {
          "type": "FeatureCollection",
          "features": [
            {
              "type": "Feature",
              "geometry": {
                "type": "Polygon",
                "coordinates": [
                  [
                    [
                      11.268537191506006,
                      45.96896336761951
                    ],
                    [
                      10.963128662060829,
                      45.96896336761951
                    ],
                    [
                      10.963128662060829,
                      46.283354500871894
                    ],
                    [
                      11.268537191506006,
                      46.283354500871894
                    ],
                    [
                      11.268537191506006,
                      45.96896336761951
                    ]
                  ]
                ]
              },
              "properties": null
            },
            {
              "type": "Feature",
              "geometry": {
                "type": "Polygon",
                "coordinates": [
                  [
                    [
                      10.812016759290925,
                      46.0862169741777
                    ],
                    [
                      10.907763149872332,
                      46.0862169741777
                    ],
                    [
                      10.907763149872332,
                      46.2248348829299
                    ],
                    [
                      10.812016759290925,
                      46.2248348829299
                    ],
                    [
                      10.812016759290925,
                      46.0862169741777
                    ]
                  ]
                ]
              },
              "properties": null
            }
          ]
        },
        "total_count": 100,
        "geometry_count": null,
        "seed": 0
      }
    }
  }
}

but the back-end translates it into the Process class removing the "geometry_count": null


class Job {
    id: null
    title: null
    description: null
    process: class Process {
        id: null
        summary: null
        description: null
        categories: null
        parameters: [B@3fa618ef
        returns: null
        deprecated: false
        experimental: false
        exceptions: {}
        examples: null
        links: null
        processGraph: {
        "4": {
            "process_id": "vector_to_random_points",
            "arguments": {
                "data": {
                    "type": "FeatureCollection",
                    "features": [
                        {
                            "type": "Feature",
                            "geometry": {
                                "type": "Polygon",
                                "coordinates": [[
                                    [
                                        11.268537191506006,
                                        45.96896336761951
                                    ],
                                    [
                                        10.963128662060829,
                                        45.96896336761951
                                    ],
                                    [
                                        10.963128662060829,
                                        46.283354500871894
                                    ],
                                    [
                                        11.268537191506006,
                                        46.283354500871894
                                    ],
                                    [
                                        11.268537191506006,
                                        45.96896336761951
                                    ]
                                ]]
                            }
                        },
                        {
                            "type": "Feature",
                            "geometry": {
                                "type": "Polygon",
                                "coordinates": [[
                                    [
                                        10.812016759290925,
                                        46.0862169741777
                                    ],
                                    [
                                        10.907763149872332,
                                        46.0862169741777
                                    ],
                                    [
                                        10.907763149872332,
                                        46.2248348829299
                                    ],
                                    [
                                        10.812016759290925,
                                        46.2248348829299
                                    ],
                                    [
                                        10.812016759290925,
                                        46.0862169741777
                                    ]
                                ]]
                            }
                        }
                    ]
                },
                "seed": 0,
                "total_count": 100
            }
        },
        "1": {
            "result": true,
            "process_id": "load_collection",
            "arguments": {
                "spatial_extent": {
                    "west": 3.5446677656937715,
                    "east": 18.990556343370127,
                    "south": 42.28250560234868,
                    "north": 48.77837603135202
                },
                "temporal_extent": [
                    "2000-02-25T23:59:00Z",
                    "2020-11-11T23:59:00Z"
                ],
                "id": "ADO_NDVI_MODIS_231m_3035_ODC"
            }
        },
        "3": {
            "process_id": "save_result",
            "arguments": {
                "data": {"from_node": "4"},
                "format": "JSON"
            }
        }
    }
    }
    status: created
    progress: 0
    created: null
    updated: null
    plan: null
    costs: null
    budget: null
}

the default value for geometry_count is 1, so when this process graph is sent to the ODC engine, geometry_count becomes = 1. We need to keep all the parameters set to null as they are

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

1 participant