Cropwise
powered by syngenta

Using the Relief Maps API

Requirements:

The Relief Maps API provides access to terrain elevation data through map tiles. This API enables you to visualize topographic features, understand field slopes, and analyze elevation patterns across your Area of Interest (AOI).

When to use

Use the Relief Maps API when you need to:

  • Analyze terrain topography - Understand elevation changes and identify high and low areas within fields
  • Plan water management - Identify natural drainage patterns and potential waterlogging areas
  • Create management zones - Combine elevation data with other field metrics for precision agriculture
  • Optimize equipment routes - Plan field operations based on terrain characteristics
  • Assess erosion risk - Identify slopes and areas prone to soil erosion

How it works

The Relief Maps API follows the standard Map Tiles format (TMS/XYZ), making it compatible with popular mapping libraries. Given an Area of Interest (AOI) - which can be a field, property, or region - the API returns PNG tiles showing terrain elevation data.

The endpoint for the Relief Maps API is:

`https://api.remote-sensing.cropwise.com/images/relief/${aoiType}/${aoiId}/tiles/{z}/{x}/{y}.png?session_token=${sessionToken}`

See the Relief Maps API docs for more details on the parameters.

Remember: When using the endpoint in the examples below, you should only replace the placeholders with the actual values, such as image_id, subproduct, raster_type, and session_token, not the {z},{x}, and {y}. These will be automatically filled in by the map rendering library you are using.

Setting up with Mapbox

See this example for how to use the Map Tiles API with Mapbox GL JS.

When filling the tiles array, you can use the following format:

    'tiles': [`https://api.remote-sensing.cropwise.com/images/relief/${aoiType}/${aoiId}/tiles/{z}/{x}/{y}.png?session_token=${sessionToken}`]

Setting up with Leaflet

See this example for how to use the Map Tiles API with Leaflet.

When adding a tile layer in Leaflet, you can use the following format:

L.tileLayer(`https://api.remote-sensing.cropwise.com/images/relief/${aoiType}/${aoiId}/tiles/{z}/{x}/{y}.png?session_token=${sessionToken}`, {
    maxZoom: 18,
    attribution: 'Cropwise Remote Sensing'
}).addTo(map);