Files
lynchmark/tests/11_geospatial/outputs/google_gemini-3.1-pro-preview.js
2026-02-19 16:23:35 +00:00

12 lines
410 B
JavaScript

const analyzeGPS = async (r, b) => {
const t = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm');
const v = r
.filter(p => t.booleanPointInPolygon(t.point(p.loc), b, { ignoreBoundary: true }))
.sort((x, y) => x.ts - y.ts);
return v.length < 2 ? 0 : +t.length(t.lineString(v.map(p => p.loc))).toFixed(2);
};
export default analyzeGPS;
// Generation time: 23.653s
// Result: PASS