Buscar Produtividade por Geometria
Descrição: Busca dados de produtividade agrícola a partir de uma geometria (polígono) fornecida. Permite análise de produtividade em áreas específicas definidas pelo usuário.
Endpoint
POST/api/v1/integration/productivity/geometry
Regras
| Atributos | Descrição | Tipo | Obrigatório | Validações |
|---|---|---|---|---|
| geom | Geometria no formato WKT ou GeoJSON | String | Não | Geometria válida |
| city_code | Código IBGE da cidade | Integer | Não | - |
| year | Ano de referência | String | Não | - |
| culture | Tipo de cultura agrícola | String (Enum) | Não | Valores: SOY, CORN, SUGAR_CANE, RICE, COTTON, COFFEE, CITRUS, PALM |
| harvest | Safra | String | Não | - |
| source | Fonte dos dados | String (Enum) | Não | Valores: MERX, MAPBIOMAS |
| exclude_smaller_areas | Excluir áreas menores | Boolean | Não | - |
Exemplo de Requisição
Exemplo de Requisição
curl -X POST\
-H "Authorization: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
-d '{
"geom": "POLYGON((-54.5 -20.5, -54.5 -20.0, -54.0 -20.0, -54.0 -20.5, -54.5 -20.5))",
"city_code": 5208707,
"year": "2023",
"culture": "SOY",
"harvest": "2022/2023",
"source": "MERX",
"exclude_smaller_areas": true
}'\
"https://homolog.api.merx.tech/api/v1/integration/productivity/geometry"
Parâmetros
Parâmetros de Cabeçalho
| Nome | Descrição | Tipo | Obrigatório |
|---|---|---|---|
| Authorization | Token de autenticação | String | Sim |
| Content-Type | Tipo do conteúdo da requisição | String | Sim |
Corpo da Requisição (Body)
Request Body
{
"geom": "string",
"city_code": 0,
"year": "string",
"culture": "string",
"harvest": "string",
"source": "string",
"exclude_smaller_areas": true
}
| Campo | Tipo | Descrição | Obrigatório |
|---|---|---|---|
| geom | String | Geometria no formato WKT (Well-Known Text) ou GeoJSON | Não |
| city_code | Integer | Código IBGE da cidade | Não |
| year | String | Ano de referência | Não |
| culture | String (Enum) | Tipo de cultura agrícola | Não |
| harvest | String | Identificador da safra | Não |
| source | String (Enum) | Fonte dos dados (MERX ou MAPBIOMAS) | Não |
| exclude_smaller_areas | Boolean | Excluir áreas menores da análise | Não |
Culturas Disponíveis
| Valor | Descrição |
|---|---|
| SOY | Soja |
| CORN | Milho |
| SUGAR_CANE | Cana-de-açúcar |
| RICE | Arroz |
| COTTON | Algodão |
| COFFEE | Café |
| CITRUS | Citrus |
| PALM | Palma |
Fontes de Dados
| Valor | Descrição |
|---|---|
| MERX | Dados processados pela plataforma Merx |
| MAPBIOMAS | Dados do projeto MapBiomas |
Respostas
- 200 - Ok
[
{
"car": "MT-5107909-XXXXXXXXXXXXXXXXXXXXXXXX",
"year_area": "2023",
"year_productivity": "2023",
"harvest": "2022/2023",
"product": "SOY",
"county_productivity": 55.5,
"planted_area": 150.75,
"declared_area": 200.0,
"estimated_total_annual_production": 8366.625,
"geo_json": "{...}"
}
]
Campos da Resposta
| Campo | Tipo | Descrição |
|---|---|---|
| car | String | Cadastro Ambiental Rural |
| year_area | String | Ano de referência da área |
| year_productivity | String | Ano de referência da produtividade |
| harvest | String | Identificador da safra |
| product | String | Tipo de cultura/produto |
| county_productivity | Double | Produtividade média do município (ton/ha ou kg/ha) |
| planted_area | Double | Área plantada em hectares |
| declared_area | Double | Área declarada em hectares |
| estimated_total_annual_production | Double | Produção total anual estimada |
| geo_json | String | Geometria em formato GeoJSON |
- 400 - Bad Request
{
"timestamp": "string (date-time)",
"status": 400,
"error": "string"
}
- 401 - Unauthorized