Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task id on task polygon and feature extracts #976

Merged
merged 7 commits into from
Nov 21, 2023

Conversation

Sujanadh
Copy link
Contributor

@Sujanadh Sujanadh commented Nov 7, 2023

fixes #964
added task_id on the task polygon and feature extracts file.

@spwoodcock
Copy link
Member

@Sujanadh can you address the looping issue when you get a chance please?

I'll merge as soon as you do 👍

@susmina94
Copy link
Collaborator

susmina94 commented Nov 21, 2023

@spwoodcock @nrjadkry
Problem

We have a few users using FMTM splitting algorithm to create just the splitted polygons and download the splits and data extracts for each of them.

But it seemed that there are no linkages between the splitted polygons and the data extracts that contained within them.
The attributes for the splits and data extract only had a unique id column.

They had to manually add columns to the data extract to assign the ids of split polygons to each data extract

Requirement

They requested if we could generate task ids and also map the task ids to each feature in the data extract that lies under the specific task.

@spwoodcock
Copy link
Member

spwoodcock commented Nov 21, 2023

@susmina94 thanks for the context =)

I have no issue with the rationale for the PR, just the implementation is inefficient.
It currently queries the database for every feature in the geojson.

I will make the changes I proposed in the code review👍

@Sujanadh
Copy link
Contributor Author

@spwoodcock i have been working on other issue , i will get to back to this as soon as i complete other one.

@spwoodcock
Copy link
Member

Oh, sorry @Sujanadh - I just made the update 😄

@spwoodcock spwoodcock merged commit 7856df2 into development Nov 21, 2023
2 of 3 checks passed
@spwoodcock spwoodcock deleted the 964_task_id_on_task_polygon branch November 21, 2023 10:54
nischalstha9 pushed a commit to naxa-developers/fmtm that referenced this pull request Dec 8, 2023
* feat: added qr code in task list

* added qr code in taskout schema

* feat: added task id on task polygon file

* feat: added task_id on features extracted file

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* perf: prevent db call for each feat in task geojson

* refactor: typo task_id_mapping --> task_feature_mapping

---------

Co-authored-by: sujanadh <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: spwoodcock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to backend code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add task ids on task_polygon file and task id, feature id on data extract file
3 participants