Fix GeoJSON returned by /navdata endpoint

This commit is contained in:
D. Berge
2025-08-10 21:36:37 +02:00
parent b8b25dcd62
commit 39d9c9d748

View File

@@ -7,7 +7,10 @@ async function lines (options = {}) {
const client = await pool.connect();
const text = `
SELECT ST_AsGeoJSON(ST_MakeLine(geometry)) geojson
SELECT json_build_object(
'type', 'Feature',
'geometry', ST_AsGeoJSON(ST_MakeLine(geometry))::json
) geojson
FROM (
SELECT geometry
FROM real_time_inputs