MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / getFieldCenter

Function getFieldCenter

src/components/FieldComparisonColumn.tsx:61–66  ·  view source on GitHub ↗
(field: Field)

Source from the content-addressed store, hash-verified

59};
60
61function getFieldCenter(field: Field) {
62 const coords = field.coordinates[0];
63 const lat = coords.reduce((sum, c) => sum + c[1], 0) / coords.length;
64 const lng = coords.reduce((sum, c) => sum + c[0], 0) / coords.length;
65 return { lat, lng };
66}
67
68const GEE_ANALYTICS_CACHE_KEY = "gee-analytics-cache";
69const QUERY_CACHE_TTL_MS = 60 * 60 * 1000;

Callers 1

fetchWeatherDataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected