Skip to content

Generate an analysis

Now that your polygon has been created, you can start generating analyses on it. Generating an analysis is also known as "generating images" since the result of an analysis request is 0 or more images that you download and display to your users. For this tutorial, you will generate images for two of the Vultus services:

  • Plant Health
  • Water Stress

All analysis requests are created using their specific processSomeAnalysis() mutations. Each mutation takes three required arguments:

  • polygonId
  • startDate
  • endDate

In this example, you will generate Plant Health images for 2023. This index is also known as NDVI. Copy and paste the mutation below into the API Playground and press the EXECUTE button. Be sure to change the polygonId to the id of the polygon you created.

mutation {
  processPlantHealth(
    polygonId: "[YOUR POLYGON_ID GOES HERE]", 
    startDate: "2023-03-01", 
    endDate:  "2023-09-30"
  ) 
  {
    Message
    Status
    Result {
      requestId
    }
  }
}

The API will return something like this.

{
  "data": {
    "processPlantHealth": {
      "Message": "Success",
      "Status": 200,
      "Result": {
        "requestId": "[AUTO-GENERATED REQUEST_ID]"
      }
    }
  }
}

The Message, and Status values returned show the status of the communication with the Vultus API and not the status of the analysis request. In order to check the status of the request, you need to use the retrieveRequestDetails() query and the retrieveSatelliteDownload() query. Make a note of the requestId as you will need it in the next section of the tutorial.

Water Stress

Now, let's generate images for Water Stress. This index is also known as NDWI

Copy and paste the mutation below into the API Playground and press the RUN button. Again, be sure to change the polygonId to the id of the polygon you created.

mutation {
  processWaterStress(
    polygonId: "[YOUR POLYGON_ID HERE]" , 
    startDate: "2023-03-01", 
    endDate:  "2023-09-30"
  ) 
  {
    Message
    Status
    Result {
      requestId
    }
  }
}

Again, make a note of the requestId as you will need it in the next section of the tutorial.