Skip to content

Commit

Permalink
fix: populate task_id correctly in feature properties (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujanadh authored May 13, 2024
1 parent 820e813 commit 7febda0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/backend/app/db/postgis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,11 @@ async def split_geojson_by_task_areas(
SELECT jsonb_array_elements(CAST(:geojson_featcol AS jsonb)->'features')
AS feature
) AS features
CROSS JOIN tasks
WHERE tasks.project_id = :project_id;
JOIN tasks ON tasks.project_id = :project_id
WHERE
ST_Within(
ST_Centroid(ST_SetSRID(ST_GeomFromGeoJSON(feature->>'geometry'), 4326)
), tasks.outline);
-- Retrieve task outlines based on the provided project_id
SELECT
Expand Down

0 comments on commit 7febda0

Please sign in to comment.