mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-01-13 16:17:54 +00:00
Delete tests/11_geospatial/outputs_gemini directory
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://esm.sh/@turf/turf');
|
||||
|
||||
const coords = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc);
|
||||
|
||||
return coords.length < 2 ? 0 :
|
||||
Math.round(length(lineString(coords), { units: 'kilometers' }) * 100) / 100;
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,13 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } =
|
||||
await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm')
|
||||
|
||||
const valid = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc)
|
||||
|
||||
return valid.length < 2 ? 0 :
|
||||
Math.round(length(lineString(valid), { units: 'kilometers' }) * 100) / 100
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,12 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const t = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm')
|
||||
|
||||
const pts = readings
|
||||
.filter(({ loc }) => t.booleanPointInPolygon(t.point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc)
|
||||
|
||||
return pts.length < 2 ? 0 :
|
||||
Math.round(t.length(t.lineString(pts), { units: 'kilometers' }) * 100) / 100
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,11 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const t = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm');
|
||||
const pts = readings
|
||||
.filter(({ loc }) => t.booleanPointInPolygon(t.point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc);
|
||||
|
||||
return pts.length < 2 ? 0 :
|
||||
Math.round(t.length(t.lineString(pts), { units: 'kilometers' }) * 100) / 100;
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,12 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const t = await import('https://esm.sh/@turf/turf');
|
||||
|
||||
const pts = readings
|
||||
.filter(({ loc }) => t.booleanPointInPolygon(t.point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc);
|
||||
|
||||
return pts.length < 2 ? 0 :
|
||||
Math.round(t.length(t.lineString(pts), { units: 'kilometers' }) * 100) / 100;
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,12 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm')
|
||||
|
||||
const path = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc)
|
||||
|
||||
return path.length < 2 ? 0 :
|
||||
Math.round(length(lineString(path), { units: 'kilometers' }) * 100) / 100
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,9 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const t = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm');
|
||||
const pts = readings
|
||||
.filter(r => t.booleanPointInPolygon(t.point(r.loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc);
|
||||
return pts.length < 2 ? 0 : +t.length(t.lineString(pts), { units: 'kilometers' }).toFixed(2);
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,13 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://esm.sh/@turf/turf')
|
||||
|
||||
const path = readings
|
||||
.filter(r => booleanPointInPolygon(point(r.loc), boundary))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc)
|
||||
|
||||
return path.length < 2
|
||||
? 0
|
||||
: +length(lineString(path), { units: 'kilometers' }).toFixed(2)
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,14 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://esm.sh/@turf/turf');
|
||||
|
||||
const coords = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc);
|
||||
|
||||
if (coords.length < 2) return 0;
|
||||
|
||||
const total = length(lineString(coords), { units: 'kilometers' });
|
||||
return Math.round(total * 100) / 100;
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,12 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://esm.sh/@turf/turf');
|
||||
|
||||
const coords = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc);
|
||||
|
||||
return coords.length < 2 ? 0 :
|
||||
Math.round(length(lineString(coords), { units: 'kilometers' }) * 100) / 100;
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,11 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const turf = await import('https://esm.sh/@turf/turf');
|
||||
const coords = readings
|
||||
.filter(({ loc }) => turf.booleanPointInPolygon(turf.point(loc), boundary))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc);
|
||||
|
||||
return coords.length < 2 ? 0 :
|
||||
Math.round(turf.length(turf.lineString(coords), { units: 'kilometers' }) * 100) / 100;
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,12 +0,0 @@
|
||||
export const analyzeGPS = async (readings, boundary) => {
|
||||
const { point, booleanPointInPolygon, lineString, length } = await import('https://esm.sh/@turf/turf@6.5.0')
|
||||
|
||||
const coords = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc)
|
||||
|
||||
return coords.length < 2 ? 0 :
|
||||
Math.round(length(lineString(coords), { units: 'kilometers' }) * 100) / 100
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,11 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://esm.sh/@turf/turf');
|
||||
|
||||
const path = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc);
|
||||
|
||||
return path.length < 2 ? 0 : +length(lineString(path)).toFixed(2);
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,13 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon: inside, point, lineString, length } = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm')
|
||||
|
||||
const path = readings
|
||||
.filter(({ loc }) => inside(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(({ loc }) => loc)
|
||||
|
||||
if (path.length < 2) return 0
|
||||
|
||||
return +length(lineString(path), { units: 'kilometers' }).toFixed(2)
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,13 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const turf = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm');
|
||||
|
||||
const pts = readings
|
||||
.filter(r => turf.booleanPointInPolygon(turf.point(r.loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc);
|
||||
|
||||
return pts.length < 2
|
||||
? 0
|
||||
: +turf.length(turf.lineString(pts), { units: 'kilometers' }).toFixed(2);
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,9 +0,0 @@
|
||||
const analyzeGPS = async (data, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm')
|
||||
const pts = data
|
||||
.filter(d => booleanPointInPolygon(point(d.loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(d => d.loc)
|
||||
return pts.length < 2 ? 0 : +length(lineString(pts)).toFixed(2)
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,11 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { point, booleanPointInPolygon, lineString, length } = await import('https://cdn.jsdelivr.net/npm/@turf/turf/+esm');
|
||||
|
||||
const path = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc);
|
||||
|
||||
return path.length < 2 ? 0 : +length(lineString(path)).toFixed(2);
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,11 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { point, booleanPointInPolygon, lineString, length } = await import('https://esm.sh/@turf/turf')
|
||||
|
||||
const path = readings
|
||||
.filter(({ loc }) => booleanPointInPolygon(point(loc), boundary))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc)
|
||||
|
||||
return path.length < 2 ? 0 : +length(lineString(path), { units: 'kilometers' }).toFixed(2)
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,12 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const T = await import('https://esm.sh/@turf/turf')
|
||||
const valid = readings
|
||||
.filter(r => T.booleanPointInPolygon(T.point(r.loc), boundary))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
|
||||
if (valid.length < 2) return 0
|
||||
|
||||
const line = T.lineString(valid.map(v => v.loc))
|
||||
return Math.round(T.length(line) * 1e2) / 1e2
|
||||
}
|
||||
export default analyzeGPS;
|
||||
@@ -1,13 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const T = await import('https://esm.sh/@turf/turf');
|
||||
|
||||
const pts = readings
|
||||
.filter(({ loc }) => T.booleanPointInPolygon(T.point(loc), boundary, { ignoreBoundary: true }))
|
||||
.sort((a, b) => a.ts - b.ts)
|
||||
.map(r => r.loc);
|
||||
|
||||
return pts.length < 2
|
||||
? 0
|
||||
: +T.length(T.lineString(pts), { units: 'kilometers' }).toFixed(2);
|
||||
};
|
||||
export default analyzeGPS;
|
||||
@@ -1,9 +0,0 @@
|
||||
const analyzeGPS = async (readings, boundary) => {
|
||||
const { booleanPointInPolygon, point, lineString, length } = await import('https://esm.sh/@turf/turf');
|
||||
const valid = readings
|
||||
.filter(r => booleanPointInPolygon(point(r.loc), boundary))
|
||||
.sort((a, b) => a.ts - b.ts);
|
||||
|
||||
return valid.length < 2 ? 0 : +length(lineString(valid.map(r => r.loc))).toFixed(2);
|
||||
};
|
||||
export default analyzeGPS;
|
||||
Reference in New Issue
Block a user