Aggregate_spatial not preserving GeoJSON feature properties

Hello!

I am attempting to export NO2 emissions data as a vector data cube at predefined datapoint. My process graph looks similar to below:

{
  "process_graph": {
    "load2": {
      "process_id": "load_collection",
      "arguments": {
        "id": "SENTINEL_5P_L2",
        "spatial_extent": {
          "west": 74.1369094108679,
          "east": 86.18811680201414,
          "south": 20.134290774220062,
          "north": 25.61491962553862
        },
        "temporal_extent": [
          "2020-09-01T00:00:00Z",
          "2020-09-01T00:00:00Z"
        ],
        "bands": [
          "NO2"
        ]
      }
    },
    "aggregate8": {
      "process_id": "aggregate_spatial",
      "arguments": {
        "data": {
          "from_node": "load2"
        },
        "reducer": {
          "process_graph": {
            "first1": {
              "process_id": "first",
              "arguments": {},
              "result": true
            }
          }
        },
        "geometries": {
          "type": "FeatureCollection",
          "features": [
            {
              "type": "Feature",
              "geometry": {
                "type": "Point",
                "coordinates": [
                  74.96572043489255,
                  23.299111778868507
                ]
              },
              "properties": {
                "my_id": 101
              }
            }
          ]
        }
      }
    },
    "save9": {
      "process_id": "save_result",
      "arguments": {
        "format": "CSV",
        "data": {
          "from_node": "aggregate8"
        }
      },
      "result": true
    }
  },
  "parameters": []
}

The output csv looks like:

date,feature_index,first(band_0)
2020-09-01T00:00:00.000Z,5,2.0137875253567472E-5

It appears that each feature is getting a seemingly random index. Its difficult to deduce which location the above value belongs. Ideally, I would like to include (wkt) geometry for each row, and at the lease would like to preserve the property I am associating with each feature so that I can do the geometry mapping back as my own post processing step.

Documentation for aggregate_spatial seems to suggest that feature properties should be preserved: “Feature properties are preserved for vector data cubes and all GeoJSON Features.”, yet I do not see those in the output file.

Alternatively, I would appreciate a pointer the most optimal way to convert the sentinel 5 data to vector data if my process in inefficient (I am new to the openEO platform).

I am grateful for the help in advance.

Hi,

The feature_index is based on the order the features are defined in the geojson.

Alternatively, there is a feature_id_property field that can be used to keep your defined ID’s. But that is an undocumented feature at the moment.

Emile