80. Query: Get Original Data

Query to get the copy of the uploaded original data of "SoilDataset", "YieldDataset", "AsAppliedDataset".

GEOTIFF and GEOJSON are available as formats. But only GEOJSON is now supported.

1. Sample for SoilDataset

query GetOriginalDataOfSoilDataset {
  getFarms (farmUuids: ["<placeholder_of_farm_uuid>"]){
    uuid
    fields (fieldUuids: ["<placeholder_of_field_uuid>"]) {
      uuid
      soilDatasets(soilDatasetUuids: ["<placeholder_of_dataset_uuid>"]) {
        uuid
        originDataUrl(format: GEOJSON)
      }
    }
  }
}

2. Sample for YieldDataset

query GetOriginalDataOfYieldDataset {
  getFarms (farmUuids: ["<placeholder_of_farm_uuid>"]){
    uuid
    fields (fieldUuids: ["<placeholder_of_field_uuid>"]) {
      uuid
      yieldDatasets(yieldDatasetUuids: ["<placeholder_of_dataset_uuid>"]) {
        uuid
        originDataUrl(format: GEOJSON)
      }
    }
  }
}

3. Sample for AsAppliedDataset

query GetOriginalDataOfAsAppliedDataset {
  getFarms (farmUuids: ["<placeholder_of_farm_uuid>"]){
    uuid
    fields (fieldUuids: ["<placeholder_of_field_uuid>"]) {
      uuid
      asAppliedDatasets(asAppliedDatasetUuids: ["<placeholder_of_dataset_uuid>"]) {
        originDataUrl(format: GEOJSON)
      }
    }
  }
}

4. Download the generated file

After the successful preparation of the file, it is possible to download it using curl or a similar approach.

curl '<originDataUrl>' --compressed >> '<local_filepath>'

Last updated

Was this helpful?