farm-layout-model / samples /output_example.json
spacedout-bits's picture
Add JSON integration schemas for user app interop
b9e0ad7
{
"type": "FeatureCollection",
"properties": {
"type": "farm_design",
"farm_id": "FARM_001",
"generated_at": "2026-04-22T10:00:05Z",
"design_summary": {
"farm_area_ha": 0.24,
"total_valves": 3,
"total_drip_tape_m": 480.5,
"total_main_line_m": 45.2,
"total_emitters": 1202,
"pump_hp": 5.0,
"pump_flow_lph": 500,
"manifold_strategy": "distributed"
},
"bom": {
"main_line_16mm_m": 45.2,
"drip_tape_16mm_m": 480.5,
"inline_emitters": 1202,
"total_pipe_m": 525.7,
"valves_count": 3,
"cost_main": 22.60,
"cost_drip_tape": 72.08,
"cost_emitters": 96.16,
"cost_valves": 45.00,
"total_cost_usd": 235.84
}
},
"features": [
{
"type": "Feature",
"properties": {
"type": "farm_boundary",
"area_ha": 0.24
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[77.5946, 12.9716],
[77.5960, 12.9716],
[77.5960, 12.9730],
[77.5946, 12.9730],
[77.5946, 12.9716]
]
]
}
},
{
"type": "Feature",
"properties": {
"type": "valve",
"id": "valve_000",
"strategy": "distributed",
"reason": "crop_type",
"crop": "tomato",
"flow_capacity_lph": 500,
"estimated_demand_lph": 480
},
"geometry": {
"type": "Point",
"coordinates": [77.5948, 12.9721]
}
},
{
"type": "Feature",
"properties": {
"type": "valve",
"id": "valve_001",
"strategy": "distributed",
"reason": "crop_type",
"crop": "lettuce",
"flow_capacity_lph": 500,
"estimated_demand_lph": 200
},
"geometry": {
"type": "Point",
"coordinates": [77.5956, 12.9721]
}
},
{
"type": "Feature",
"properties": {
"type": "valve",
"id": "valve_002",
"strategy": "distributed",
"reason": "capacity_split",
"crop": "tomato",
"flow_capacity_lph": 500,
"estimated_demand_lph": 480
},
"geometry": {
"type": "Point",
"coordinates": [77.5951, 12.9724]
}
},
{
"type": "Feature",
"properties": {
"type": "valve_zone",
"valve_id": "valve_000",
"area_m2": 600.0,
"area_ha": 0.06,
"crop": "tomato"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[77.5948, 12.9718],
[77.5951, 12.9718],
[77.5951, 12.9724],
[77.5948, 12.9724],
[77.5948, 12.9718]
]
]
}
},
{
"type": "Feature",
"properties": {
"type": "valve_zone",
"valve_id": "valve_001",
"area_m2": 400.0,
"area_ha": 0.04,
"crop": "lettuce"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[77.5954, 12.9718],
[77.5958, 12.9718],
[77.5958, 12.9724],
[77.5954, 12.9724],
[77.5954, 12.9718]
]
]
}
},
{
"type": "Feature",
"properties": {
"type": "main_line",
"length_m": 45.2,
"pipe_diameter_mm": 16
},
"geometry": {
"type": "LineString",
"coordinates": [
[77.5946, 12.9716],
[77.5948, 12.9721],
[77.5956, 12.9721]
]
}
},
{
"type": "Feature",
"properties": {
"type": "lateral",
"index": 0,
"length_m": 30.0,
"valve_id": "valve_000",
"spacing_m": 0.5
},
"geometry": {
"type": "LineString",
"coordinates": [
[77.5948, 12.9719],
[77.5951, 12.9719]
]
}
},
{
"type": "Feature",
"properties": {
"type": "lateral",
"index": 1,
"length_m": 30.0,
"valve_id": "valve_000",
"spacing_m": 0.5
},
"geometry": {
"type": "LineString",
"coordinates": [
[77.5948, 12.9720],
[77.5951, 12.9720]
]
}
}
]
}