Read one raster cell
curl --request GET \
--url https://api.verdant-ai.com/api/v1/layers/{id}/sampleimport requests
url = "https://api.verdant-ai.com/api/v1/layers/{id}/sample"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.verdant-ai.com/api/v1/layers/{id}/sample', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verdant-ai.com/api/v1/layers/{id}/sample",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.verdant-ai.com/api/v1/layers/{id}/sample"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.verdant-ai.com/api/v1/layers/{id}/sample")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verdant-ai.com/api/v1/layers/{id}/sample")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"datasetVersion": "<string>",
"tile": "<string>",
"row": 0,
"col": 0,
"value": 123,
"unit": "<string>",
"variable": "<string>",
"date": "2023-12-25",
"crs": "<string>",
"transform": [
123,
123,
123,
123,
123,
123
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}Raster
Read one raster cell
Return one native cell and its spatial metadata. A null value means missing, and its unit and evidence class do not change.
GET
/
api
/
v1
/
layers
/
{id}
/
sample
Read one raster cell
curl --request GET \
--url https://api.verdant-ai.com/api/v1/layers/{id}/sampleimport requests
url = "https://api.verdant-ai.com/api/v1/layers/{id}/sample"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.verdant-ai.com/api/v1/layers/{id}/sample', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.verdant-ai.com/api/v1/layers/{id}/sample",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.verdant-ai.com/api/v1/layers/{id}/sample"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.verdant-ai.com/api/v1/layers/{id}/sample")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verdant-ai.com/api/v1/layers/{id}/sample")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"datasetVersion": "<string>",
"tile": "<string>",
"row": 0,
"col": 0,
"value": 123,
"unit": "<string>",
"variable": "<string>",
"date": "2023-12-25",
"crs": "<string>",
"transform": [
123,
123,
123,
123,
123,
123
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"issues": [
{
"code": "<string>",
"path": [
"<string>"
],
"message": "<string>"
}
]
}Path Parameters
Immutable dataset version ID returned by the catalog.
Pattern:
^[a-zA-Z0-9_-]{1,128}$Query Parameters
Tile ID from the layer index.
Zero-based index within this tile.
Required range:
x >= 0Zero-based index within this tile.
Required range:
x >= 0Response
One native raster cell.
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$Show child attributes
Show child attributes