farm-layout-model / samples /rest_input_example.json
spacedout-bits's picture
Add REST /api/v1/design endpoint accepting farm/plots/water_sources
257fce1
{
"farm": {
"name": "DakshFarm",
"location": {
"address": "Tehsil ABC, District Bijnor, State UP, India",
"latitude": 20.593700,
"longitude": 78.962900
},
"size": { "value": 2.5, "unit": "acres" },
"crop_name": "generic"
},
"plots": [
{
"plot_id": "plot_1",
"name": "Plot 1",
"area_sq_m": 12450.0,
"centroid": { "latitude": 20.593812, "longitude": 78.962745 },
"boundaries": [
{ "latitude": 20.593700, "longitude": 78.962600 },
{ "latitude": 20.593930, "longitude": 78.962620 },
{ "latitude": 20.593960, "longitude": 78.962890 },
{ "latitude": 20.593720, "longitude": 78.962910 },
{ "latitude": 20.593700, "longitude": 78.962600 }
]
},
{
"plot_id": "plot_2",
"name": "Plot 2",
"area_sq_m": 8450.0,
"centroid": { "latitude": 20.594102, "longitude": 78.962510 },
"boundaries": [
{ "latitude": 20.594000, "longitude": 78.962400 },
{ "latitude": 20.594210, "longitude": 78.962420 },
{ "latitude": 20.594230, "longitude": 78.962620 },
{ "latitude": 20.594020, "longitude": 78.962640 },
{ "latitude": 20.594000, "longitude": 78.962400 }
]
}
],
"water_sources": [
{
"water_source_id": "ws_1",
"type": "Motor",
"name": "Motor-1",
"location": { "latitude": 20.593860, "longitude": 78.962780 },
"plot_id": "plot_1"
},
{
"water_source_id": "ws_2",
"type": "Motor",
"name": "Motor-2",
"location": { "latitude": 20.594140, "longitude": 78.962530 },
"plot_id": "plot_2"
}
],
"pump_hp": 5.0,
"headland_buffer_m": 1.0
}