Advanced Deforestation Analysis Platform
Integrate the CarbonEye engine by sending a POST
request to the API endpoint. The request body must be a JSON object containing a bbox
(bounding box) array in the format: [west, south, east, north]
.
curl -X POST https://carboneye.onrender.com/analyze-deforestation \
-H "Content-Type: application/json" \
-d '{
"bbox": [-60.0, -10.0, -59.0, -9.0]
}'
const analyzeDeforestation = async () => {
const endpoint = 'https://carboneye.onrender.com/analyze-deforestation';
const data = { bbox: [-60.0, -10.0, -59.0, -9.0] };
try {
const response = await fetch(endpoint, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(data)
});
if (!response.ok) throw new Error(`HTTP error! Status: ${response.status}`);
const result = await response.json();
console.log('Analysis Result:', result);
return result;
} catch (error) {
console.error('Error fetching analysis:', error);
}
};
analyzeDeforestation();
Note: The API is on a free-tier service and may take 30-60 seconds to "wake up" on the first request. Please implement appropriate timeouts.