This is the third article in the “Satellite Imagery API” series. You can read about our product, its capabilities and why we recommend you use it, in the first article: “Why the Satellite Imagery API?”
The Satellite Imagery API includes the following features:
- an image of a polygon in PNG format
- a tile in PNG format
- zonal statistics for NDVI & EVI indices of a polygon
- an image in GeoTIFF format.
In this article we will tell you how to get tiles with your polygon in PNG format with “tile”.
The Satellite Imagery API allows you to get satellite data in the form of a tile containing your polygon in PNG format. This product was created for customers who work with map display plugins, to help them to use our satellite data in them easily.
In the results from the API, you will get the URL for the tile layers containing your polygon, and can paste it into the most common special plugins, such as Leaflet and OpenLayers. You will also be able to use any other applications that support the displaying of tile layers.
If your polygon falls on several tiles at the selected scale, each tile will contain its corresponding part when displaying the tile layer.
The client plugin (Leaflet, OpenLayers) will find the correct ZXY coordinates according to the map scale and the place on the map, and inject them into the URL template, obtained from our API.
You can get information about the polygon creation process from the documentation on our website or from the article in our blog.
Using the API, you can get an image of your territory inside your tile in all the available products (True Colour, False Colour, NDVI and EVI).
To get the tile with your polygon in PNG format, you need to follow two simple steps:
- Specify your polygon ID, search date range and API key. In the API response, you will receive an array, sorted on the date interval in the request. The array contains JSON format structures with a “tile” field, which has the URLs of all the tile layers containing images of your polygon available in our database that satisfy the specified search conditions.
- Copy the URLs from the “tile” block, and paste them into any plugins or applications that support the displaying of tile layers.
Please note – If you are using applications or plugins that do not support the displaying of tile layers, or if you pass incorrect ZXY coordinates in the request, you will get the following error: “code 400002, Incorrect zxy coordinates”.
Look for examples and parameter descriptions in our documentation!
Please also see the other articles in this series: