Skip to content

Commit d09300d

Browse files
nrjadkrySujitPradip-ppre-commit-ci[bot]bijayrauniyar0
authored
Production Release (#440)
* feat(dashboard): show drone certificate and pilot certificate on task request log * feat: ommit password section if the existing user is trying to login as another role * fix: remove comment code from task schemas * feat(regulators-approval-page): clear local storage on main page unmount * feat: implemented user certificate upload functionality, storing user certificates on S3. (#331) * feat: Implement S3 path structure & file upload for user-specific drone operator certificate uploads * refac: refactor user profile update: Add validation for empty data, handle certificate URL and role updates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: update certificate URL in database for user profile * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: update registration registration of drone operator * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(profile-update): UI Issue * feat: add method parameter on `callApiSimultaneously` function * feat(update-profile): post add files `certificate` and `drone registration` file along with the other details * feat: post drone registered certificate and drone pilot certificate on profile complete * feat: show default image on profile in case of failure * feat(update-profile): post only the binary file on certificate * feat: add `@cyntler/react-doc-viewer` package * feat: add document preview modal * feat(dashboard): implement drone certificate preview on task lock request * fix(individual-project): task requested for lock although the project owner lockes the task * feat: set certificate & registration url in my-info endpoint * fix: document viewer details style * fix: UploadArea component * feat: show uploaded certificates on edit profile page * feat: clear selectedDocumentDetails on document preview component unmount * feat(document-preview): download certificate using blob and additional UI if the file is image * feat: set the certificate & registration url in task request page * feat(dashboard): show drone certificate and pilot certificate on task request log * feat: ommit password section if the existing user is trying to login as another role * fix: remove comment code from task schemas * feat(regulators-approval-page): clear local storage on main page unmount --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sujit <[email protected]> * fix: set iscertifiedDroneUser initial value once * feat(user-profile): support pdf to upload certificates * feat: add zoom to extent function * refactor: remove unecessary states and handle session end of modal * refactor: rename title for imageMapBox modal * feat(project-approval-page): clear comment on approval comment success * feat: update type for coordinates * feat: make project `DescriptionSection` dynamic to render on both project description and project approval page * feat: add about section on project description page * feat: make regulator approval status optional to view on description section * feat(project-description): make map popup disabled if the regulator approval status is `REJECTED` * feat(project-description): disable popup open on table row click if requlator approval status is `REJECTED` * Adjust project description as per regulator's approval status (#361) * feat: Implement S3 path structure & file upload for user-specific drone operator certificate uploads * refac: refactor user profile update: Add validation for empty data, handle certificate URL and role updates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: update certificate URL in database for user profile * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: update registration registration of drone operator * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix(profile-update): UI Issue * feat: add method parameter on `callApiSimultaneously` function * feat(update-profile): post add files `certificate` and `drone registration` file along with the other details * feat: post drone registered certificate and drone pilot certificate on profile complete * feat: show default image on profile in case of failure * feat(update-profile): post only the binary file on certificate * feat: add `@cyntler/react-doc-viewer` package * feat: add document preview modal * feat(dashboard): implement drone certificate preview on task lock request * fix(individual-project): task requested for lock although the project owner lockes the task * feat: set certificate & registration url in my-info endpoint * fix: document viewer details style * fix: UploadArea component * feat: show uploaded certificates on edit profile page * feat: clear selectedDocumentDetails on document preview component unmount * feat(document-preview): download certificate using blob and additional UI if the file is image * feat: set the certificate & registration url in task request page * feat(dashboard): show drone certificate and pilot certificate on task request log * feat: ommit password section if the existing user is trying to login as another role * fix: remove comment code from task schemas * feat(regulators-approval-page): clear local storage on main page unmount * fix: set iscertifiedDroneUser initial value once * feat(user-profile): support pdf to upload certificates * feat(project-approval-page): clear comment on approval comment success * feat: make project `DescriptionSection` dynamic to render on both project description and project approval page * feat: add about section on project description page * feat: make regulator approval status optional to view on description section * feat(project-description): make map popup disabled if the regulator approval status is `REJECTED` * feat(project-description): disable popup open on table row click if requlator approval status is `REJECTED` --------- Co-authored-by: Pradip-p <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sujit <[email protected]> * fix: hide approval section if the approval status has value * add trailing slash(/) in the regulator approval endpoint * style: about project * feat(project-description): show different popup message and hide task lock button if the `regulator_approval_status` is `PENDING` or `REJECTED` * fix: about typo and set default selected project tab to about * fix: capitalize tab options label * fix: update roles in existing user when auto local regulator creation * feat(regulators-approval-section): hide approval section on approval status updates * fix: remove commented code * fix: show popup on task click although the project is rejected * fix: update roles in existing user when auto local regulator creation (#362) * fix: upadate the regulator * Fix/regulator profile creation (#366) * fix: update roles in existing user when auto local regulator creation * fix: upadate the regulator * fix: reslove user roles access issues with regulator * feat: add drone altitude regulations model * feat: Add 'get all' and 'get one' endpoints for drone altitudes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * reac: Rename DbDroneAltitude class to DbDroneFlightHeight and update table name * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: Implemented endpoint to retrieve all drone altitude regulations of country (#368) * feat: add drone altitude regulations model * feat: Add 'get all' and 'get one' endpoints for drone altitudes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * reac: Rename DbDroneAltitude class to DbDroneFlightHeight and update table name * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: add `OSM_NOMINATIM_URL` on viteconfig and env.example * feat(project-creation): get project country by project centroid using `OSM Nominatim API` find centroid with the help of `truf` Integrated Nominatim API to fetch the country based on the centroid coordinates * Replace `pdm` to `uv` for faster dependency management (#347) * feat: migrate from pdm to uv * build: replace pdm with uv, add pre-commit hook to lock deps * build: replace all usage of pdm with uv * build: replace pdm with uv for faster dependency managementreplace all usage of pdm with uv * feat: update entry point to run with uv * update: users deps login_required --------- Co-authored-by: Niraj Adhikari <[email protected]> * feat: add className optional prop to InfoMessage component for dynamic styling * feat: add orthoPhoto task component * feat: add symbol type prop for icon at tooltip * refactor: remove delay * feat: add functions to handle visiblity of vector layers and orthophoto layers * refactor: remove button of show orthophoto from description section * refactor: update onSuccess function to navigate user from task page to project page * feat(create-project): Show warning if altitude exceeds country’s max limit * feat(individual-project): disable popup only if the user role regulator and has no other roles * feat(create-project): update fields description * feat: add validations for input feild * refactor: update onSuccess Function to navigate user to dashboard after password change * style: add z-index to user profile * feat: remove nominatim api from .env and vite config and save as a constant variable since it is constant on all environment * feat: update .env.example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: Show warning if altitude exceeds country's max limit (#370) * feat: add drone altitude regulations model * feat: Add 'get all' and 'get one' endpoints for drone altitudes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * reac: Rename DbDroneAltitude class to DbDroneFlightHeight and update table name * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: add `OSM_NOMINATIM_URL` on viteconfig and env.example * feat(project-creation): get project country by project centroid using `OSM Nominatim API` find centroid with the help of `truf` Integrated Nominatim API to fetch the country based on the centroid coordinates * feat: add className optional prop to InfoMessage component for dynamic styling * feat(create-project): Show warning if altitude exceeds country’s max limit * feat(individual-project): disable popup only if the user role regulator and has no other roles * feat(create-project): update fields description * feat: remove nominatim api from .env and vite config and save as a constant variable since it is constant on all environment * feat: update .env.example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Pradip-p <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Sujit <[email protected]> * feat: overwrite props className using `cn` the utils function to merge class names using `clsc` and `twMerge` * fix: typo * feat: add validation to check if old and new password are same * refactor: update placeholder for file upload * feat: updated count waypoints within AOI * fix: added auth in endpoint * feat: update handleDrawEnd function to prevent duplicate draw * feat: add conditional rendering for orthophoto button at map * refactor: remove character length restriction from comment submission * refactor: update naming of filterDuplicateFeature parameters * fix: update waypoints count of aoi * feat: add service to get project waypoints * feat: implementation of project avg taskway points count api * feat: add logic to count number of waypoints in task split (#373) * feat: updated count waypoints within AOI * fix: added auth in endpoint * fix: update waypoints count of aoi * feat: add service to get project waypoints * feat: implementation of project avg taskway points count api --------- Co-authored-by: Bijay Rauniyar <[email protected]> * fix: disable popup trigger if user signin as `ReGULATOR` * fix: added slash in waypoints count endpoint * [pre-commit.ci] pre-commit autoupdate (#376) updates: - [github.com/astral-sh/uv-pre-commit: 0.5.2 → 0.5.5](astral-sh/uv-pre-commit@0.5.2...0.5.5) - [github.com/commitizen-tools/commitizen: v3.31.0 → v4.0.0](commitizen-tools/commitizen@v3.31.0...v4.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.8.1](astral-sh/ruff-pre-commit@v0.8.0...v0.8.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * refctor: update params and add a loading state for avg way points * fix: ensure small areas merge with the nearest one in task splitting (#378) * fix: task locking and validation error in project creator (#382) * add images.json file into s3 * feat: add turf/transform-rotate package * feat: add onDrag event listner and corresponding props * feat: add type for functions to be call at on drag event * feat: add feature to rotate filght plan * feat: add function to calculate angle, centeroid * feat: add funciton to rotate geojson * refactor: update type for function params * Feat/flightplan rotation (#383) * feat: add turf/transform-rotate package * feat: add onDrag event listner and corresponding props * feat: add type for functions to be call at on drag event * feat: add feature to rotate filght plan * feat: add function to calculate angle, centeroid * feat: add funciton to rotate geojson * refactor: update type for function params * feat: gcp app with router setup * feat: function to calculate image footprints * fix: regulator tags updated in routes * functions to find images within a point * feat: endpoint to find all the images that contains the specific point * gcp router added in main.py * typing used for params * refactor: update type for calculate angle fn * hot-fix: ignore ts on modal component * feat: add needDragEvent Prop * refactor: update taskDataPolygon and pass needDragEvent at vector layer * bump drone_flightplan version * bump drone_flightplan version (#387) * bump drone_flightplan version to 0.3.3 * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/uv-pre-commit: 0.5.5 → 0.5.7](astral-sh/uv-pre-commit@0.5.5...0.5.7) - [github.com/commitizen-tools/commitizen: v4.0.0 → v4.1.0](commitizen-tools/commitizen@v4.0.0...v4.1.0) - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.2](astral-sh/ruff-pre-commit@v0.8.1...v0.8.2) - [github.com/pycontribs/mirrors-prettier: v3.3.3 → v3.4.2](pycontribs/mirrors-prettier@v3.3.3...v3.4.2) * feat: update rotation funcitons * feat: optimization of flightplan rotation * style: add dropshadow style * feat: add newAsync Popup for taskpage * feat: add rotattionCue component * feat: optimize flightplan rotation * feat: add layer ids constants * refactor: remove unused vars * feat: add function to swap first and last coordinate and fucntion to get last coordinate * style: add responsive attributes to rotation cue * refactor: update swapFirstAndLastCoordinate * refactor: remove swapFirstAndLast coordinate function * fix: update the flight plan time & updated waypoints conuts if user terrian follow (#390) * feat: update api for taskDataPolygon * refactor: update popup close fn * refactor: update type for mouse Events * fix: calculate bbox for the drone image (#393) * refactor: update taskWayPointsData data * feat: add est flight time * refactor: update type for coordinates * feat: generate and download KMZ files with placemarks (#392) * Added API to generate and download KMZ files * feat: added centroids on task details * fix: update authentication read task * feat: update rotation cue to handle touch events * feat: add button to save rotated taskpoints * Gcp calculation (#394) * fix: calculate bbox for the drone image * fix: calculate image footprints * refactor: extract centroid from api * feat: remove conditional color of points vector layer * refactor: update get exif data function to check N and S and provide negative or positive coordinates * style: decrease height of save rotated plan button * feat: add rotation degree inside rotation cue * docs: add quick summary page about GCP workflow * style: add bgcolor for toggled buttons * feat: update events for rotation handle * Get a list of images that contains a GCP Point from a whole Project (#396) * fix: calculate bbox for the drone image * fix: calculate image footprints * feat: get a list of images that contains a point * Style/responsive (#397) * refactor: remove useEffect and items to show state * style: add css to hide spinner on input:number * style: decrease width of select and input feilds * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Fix/image procssing status (#386) * fix: add state image processing started to already image uploaded state * fix: change updated time to be same as created at * fix: add state for image processing to already present url * refactor: add funcitonality to start image processing manually * refactor: remove upload button * style: add bg color for IMAGE_UPLOADED state * fix: resolved image processing issues, state management for color, and dashboard listing --------- Co-authored-by: Bijay Rauniyar <[email protected]> Co-authored-by: Pradip-p <[email protected]> * feat: Download dem file from JAXA if not provided by the user (#380) * feat: auto add dem file if not provided by the user for more information, see https://pre-commit.ci * fix: scrapy signals issue with signals for more information, see https://pre-commit.ci * feat: add constants for dem radio data * feat: add reducer and action ro set demTYpe * feat: add dem type * feat: auto add dem file if not provided by the user for more information, see https://pre-commit.ci * fix: scrapy signals issue with signals for more information, see https://pre-commit.ci * refactor: remove title from dem type switch * fix: pre commit fix --------- Co-authored-by: Bijay Rauniyar <[email protected]> * Update README.md * update: label for dem file download from jaxa * Feat/flightplan rotation (#400) * feat: implement api to save rotated flight plan * refactor: remove type from flightPlan mutation * refactor: update condition to show update image button * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (#403) updates: - [github.com/astral-sh/uv-pre-commit: 0.5.7 → 0.5.9](astral-sh/uv-pre-commit@0.5.7...0.5.9) - [github.com/astral-sh/ruff-pre-commit: v0.8.2 → v0.8.3](astral-sh/ruff-pre-commit@v0.8.2...v0.8.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: update drone image processor to handle single and multiple tasks (#399) * feat: add endpoints to process all task images of AOI * reac: refactor process_assets_from_odm function to reduce redundancy * fix: remove double s3_path from process_assets_from_odm * fix: added all tasks images in odm processing * fix: remove local setup of config & docker-compose * fix: remove multple class for drone images processing & now handle from single class * fix: refine drone image processing * added tags in the odm webhook router endpoint --------- Co-authored-by: Niraj Adhikari <[email protected]> * Update faq section to add basic frequently asked questions.md (#402) * Update faq.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: initial py-test setup & update Dockerfile (#404) * feat: setup the pytest * feat: initial pytest setup for drone create * feat: updated dependency overrides for login required * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: updated test case for read drone * feat: update user test routes & make dummy project data as fixtures * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix: update response for flight plan * [pre-commit.ci] pre-commit autoupdate (#412) updates: - [github.com/astral-sh/uv-pre-commit: 0.5.9 → 0.5.11](astral-sh/uv-pre-commit@0.5.9...0.5.11) - [github.com/astral-sh/ruff-pre-commit: v0.8.3 → v0.8.4](astral-sh/ruff-pre-commit@v0.8.3...v0.8.4) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Implement Waylines flight mode in flights with terrain following enabled. (#411) * flight mode enums * updated drone_flightplan package * implement waylines in terrain following as well * upgrade drone_flightplan package * remove: generate each points in waypoints generation * feat: update waypint service to accept waypoint mode * feat: add reducer state and action for waypoint mode value update * feat: add constant waypoint options * feat: fetch waypoint data as per selected waypoint mode * style: download waypoints/waylines as per waypoint mode --------- Co-authored-by: Sujit <[email protected]> Co-authored-by: Sujit <[email protected]> * heading angle added in popup * fix: waypoints count * remove unwanted params in waypoint generation * change buffer distance for take off point * fix: waypoints count in project creation * fix: kmz download in android chrome * [pre-commit.ci] pre-commit autoupdate (#418) updates: - [github.com/astral-sh/uv-pre-commit: 0.5.11 → 0.5.13](astral-sh/uv-pre-commit@0.5.11...0.5.13) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix: Show re-upload section if image upload is failed (#417) * feat: show re-upload section if the image count is >0 and task status is still `LOCKED_FOR_MAPPING` if image count is >0 and status is same it indicates that all images upload is failed so it couldnt trigger the status update api so display re-upload section if image count is >0 and status is `LOCKED_FOR_MAPPING` * fix: download menu hidden on mobile view reduce waypoint mode switcher z-index * Implement all image processing with gcp files & updated task table to maintain task areas and so on. (#416) * feat: update the gcp files for all project images * feat: update the new fields in tasks tables * feat: update task areas from db to instead of postgis * feat: update task flight time, flight distance & task areas * fix: import errors in project routes * fix: waypoints & waylines counts * fix: only get unique task id based on task events when all image processing.. * fix: issues resolved in user task out lists in dashboard * fixup! fix: issues resolved in user task out lists in dashboard * feat: update assests_url in task tables instead of searching in s3 * fix: run pre-commit for format migartions file * fix: process assests from odm, download issues * feat: update the gcp files for all project images * feat: update the new fields in tasks tables * feat: update task areas from db to instead of postgis * feat: update task flight time, flight distance & task areas * fix: import errors in project routes * fix: waypoints & waylines counts * fix: only get unique task id based on task events when all image processing.. * fix: issues resolved in user task out lists in dashboard * fixup! fix: issues resolved in user task out lists in dashboard * feat: update assests_url in task tables instead of searching in s3 * fix: run pre-commit for format migartions file * fix: process assests from odm, download issues * feat: add dem file on task split api payload * fix: dem data upload section is on view althoiugh the terrian follow option is false * fix: projection creation fail if no fly is [] remove no flyzone key if np fly zone data is not available * feat: remove unused api service `getAllAssetsUrl` * feat: add remove project assets api fetch and display data from project description api * feat: add action and slice for storing assets information of task * feat(task-description-map-section): remove extra call for task information and use data from redux state * feat: remove task-assets-information api and display data from task description api store asests info on redux state on api call success and remove on component unmount update keys as per data information * refactor: comment task assets information services * refactor: remove comment * feat: implement dummy api for upload the task table * fix: remove flight data from waypoints routes --------- Co-authored-by: Sujit <[email protected]> * fix: update all image processing without gcp files issues solve on task table update * hotfix: fixes on flight plan time & distance * fix:Ensure password is saved during user creation if provided (#421) - Updated logic to handle cases where a password is provided during profile creation. Improved user creation flow to avoid incomplete records. Added checks to hash and save the password if it's present. * feat: invalidate task description storing to refetch the updated data on image upload and start processing (#422) * Feat: Implement gcp editor package (#424) * feat: add gcp editor package * feat: add start processing button on project description about section * feat(individual-project): create GcpEditor react component from the web component * feat: add services for all imagery porcess * feat: store gcp editor visible control and gcp data on redux * feat(individual-project): show gcp editor * fix:altitude in gcp list * fix: multilple api calls add `allow: once` to a event listener so that it will remove the listener immediately after it invoked once * fix: process_all_imagery for a project * Test cases for user and project functionalities with fixtures (#415) * feat: setup the pytest * feat: initial pytest setup for drone create * feat: updated dependency overrides for login required * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: updated test case for read drone * feat: update user test routes & make dummy project data as fixtures * feat: implement the test case for project create function * feat: implement the test case for user reset password success function * feat: implement the test case for project task boundaries function * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * docs: update roadmap, mobile flight plan upload, additional dji models * docs: update docs index.md to mirror readme for now * docs: add info about supported drones to readme + extra faq details * docs: remove docs page link to readme (bad formatting), write manually * docs: add DroneLink to FAQ as potential link * [pre-commit.ci] pre-commit autoupdate (#425) updates: - [github.com/astral-sh/uv-pre-commit: 0.5.13 → 0.5.14](astral-sh/uv-pre-commit@0.5.13...0.5.14) - [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.8.6](astral-sh/ruff-pre-commit@v0.8.4...v0.8.6) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: update gcp-editor version * feat: add image url * fix: duplicate images in a list in image processing * [pre-commit.ci] pre-commit autoupdate (#437) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/uv-pre-commit: 0.5.14 → 0.5.18](astral-sh/uv-pre-commit@0.5.14...0.5.18) - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.1](astral-sh/ruff-pre-commit@v0.8.6...v0.9.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * image processing status * update project db to add image processing status * Remove: duplicate code * remove: status table * image processing status added in projects api * update: processing status to processing for whole project processing * update: task status in processing of whole task * fix: migration (#439) * fix: update gcp-editor version * fix: hide gcp editor ui on project details page unmount * fix: hide image processing button if processing is ongoing * feat: refetch project detail on image processing starter api success --------- Co-authored-by: Sujit <[email protected]> Co-authored-by: Pradip-p <[email protected]> Co-authored-by: Pradip Thapa <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bijay Rauniyar <[email protected]> Co-authored-by: Sovas Tiwari <[email protected]> Co-authored-by: Sujit <[email protected]> Co-authored-by: Bijay Rauniyar <[email protected]> Co-authored-by: spwoodcock <[email protected]> Co-authored-by: Saurav Aryal <[email protected]> Co-authored-by: Manjita Pandey <[email protected]> Co-authored-by: Sujit <[email protected]> Co-authored-by: Sam <[email protected]>
1 parent b6b2f35 commit d09300d

File tree

24 files changed

+496
-106
lines changed

24 files changed

+496
-106
lines changed

Diff for: .pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ repos:
9595
# Lint / autoformat: Python code
9696
- repo: https://github.com/astral-sh/ruff-pre-commit
9797
# Ruff version.
98-
rev: "v0.8.4"
98+
rev: "v0.9.1"
9999
hooks:
100100
# Run the linter
101101
- id: ruff

Diff for: README.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ Our vision is to create a platform that is not only accessible and user-friendly
6565
4. **Seamless Pipeline**: Ensure smooth processing and dissemination of imagery data.
6666
5. **User-Friendly Application**: Designed for ease of use, allowing even non-professional pilots to contribute.
6767

68+
### Supported Drones
69+
70+
To see a list of supported and unsupported drones, please visit
71+
the [FAQ](https://hotosm.github.io/drone-tm/about/faq/#q-what-drones-are-supported) page.
72+
6873
## Getting Started
6974

7075
To get started with Drone TM:
@@ -84,17 +89,18 @@ To get started with Drone TM:
8489
|| 🖥️ upload of drone imagery collected during flight |
8590
|| 📱 follow terrain during flight plan generation in hilly/mountainous regions |
8691
|| 🖥️ merging of drone imagery into a final combined image for the project |
92+
|| 📱 flight plans working on DJI Mini 4 Pro, Air 3, and Mavic 3 |
93+
|| 📱 upload flight plan to drone via mobile app (no laptop required) |
94+
|| 🖥️ precise georeferencing of final imagery using Ground Control Points |
8795
|⚙️| 🖥️ automated Digital Elevation Model inclusion (no manual upload required) |
8896
|⚙️| 🖥️ automated uploading of final imagery to OpenAerialMap (+ credit to user that uploads) |
8997
|⚙️| 📱 allow adjustments to the flight plan orientation based on field conditions |
90-
|⚙️| 🖥️ precise georeferencing of final imagery using Ground Control Points |
98+
|⚙️| 🖥️ separate workflows for processing individual images vs batch processing in ODM |
9199
| | 📱 capture of imagery at multiple (configurable) angles from the drone camera |
92-
| | 📱 support for more drone models (DJI first, other manufacturers next) |
93-
| | 📱 removing laptop requirement for flight plan upload to drone (via mobile instead) |
100+
| | 📱 continue to add support for additional drone models |
94101
| | 🖥️ user access management for each part of the UI |
95102
| | 📱 & 🖥️ real-time notifications for drone flight progress & task status |
96103
| | 📱 improved offline capabilities of Drone-TM, reducing reliance on stable internet in the field |
97-
|⚙️| 🖥️ separate workflows for processing individual images vs batch processing in ODM |
98104
| | 🖥️ scaling of ODM imagery processing to hundreds of images in parallel |
99105
| | 🖥️ better usage of 3D model data collected by drones |
100106
| | 📱 HOT community mapping drone: cheap, mapping optimized, materials sourced locally |

Diff for: docs/about/faq.md

+25-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# ❓ Frequently Asked Questions ❓
22

3-
# Frequently Asked Questions (FAQ)
4-
53
## Q. What problem do we solve with DroneTM?
64

75
**Enhancing Emergency Response**
@@ -39,9 +37,8 @@ You can contribute to DroneTM in multiple ways:
3937

4038
Currently, only processed data is available for download. The final outputs include:
4139

42-
- **2D Orthophoto**
43-
- **Digital Terrain Model (DTM)**
44-
- **Digital Surface Model (DSM)**
40+
- **2D Orthophoto**: a birdseye view of your area (like a high resolution satellite image).
41+
- **3D Point Cloud**: this can be used to generate Digital Terrain / Surface Models.
4542

4643
---
4744

@@ -65,7 +62,7 @@ no-fly zones. There is a feature to draw these zones on the project map, and the
6562

6663
---
6764

68-
## Q. Can I use any drones to contribute to DroneTM or are there any specifications of drones?
65+
## Q. What Drones Are Supported?
6966

7067
Currently, DroneTM is tested on **DJI Mini 4 Pro**, and flight plans are optimized for its camera specifications.
7168
However, the system is compatible with any DJI drones that support waypoint features, such as:
@@ -76,3 +73,25 @@ However, the system is compatible with any DJI drones that support waypoint feat
7673

7774
Users can also download the **GeoJSON** of the task area, load it into their
7875
drones, and create custom flight plans as per the specifications provided by the project creator.
76+
77+
!!! note
78+
79+
We have two angles to increase the number of supported drones:
80+
81+
1. Support for interfacing with flight plan software such as DroneDeploy,
82+
Litchi, DroneLink, meaning any drone supported there is supported by
83+
DroneTM.
84+
85+
2. Support for Open-Source flight plan software such as ArduPilot and iNAV,
86+
widening our support signficantly to cheap custom-made drones, and in future
87+
the HOT mapping drone.
88+
89+
## Q. What Drones Are Not Supported?
90+
91+
We don't have an exhaustive list of all unsupported drones, but in general, if
92+
the drone is not listed as supported, then DroneTM will probably not work with
93+
it.
94+
95+
Our goal is to support affordable community mapping drones that ideally cost
96+
less than 1000 USD, so support for expensive commercial drones will not be
97+
a priority for now.

Diff for: docs/index.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
11
# Drone Tasking Manager
22

3-
Welcome to the docs!
3+
**Drone TM** is an integrated digital public good solution designed to harness
4+
the power of the crowd to generate high-resolution aerial maps of any location.
5+
6+
This innovative platform provides drone pilots, particularly in developing
7+
countries, with job opportunities while contributing to the creation of
8+
high-resolution datasets crucial for disaster response and community resilience.
9+
10+
## Problem Statement
11+
12+
In low-income and disaster-prone areas, the accessibility to near real-time satellite datasets is severely restricted. High-resolution satellite imagery, when available, is often prohibitively expensive and outdated. Full-scale aircraft mapping is not a viable option due to its high costs and operational complexity. Traditional mapping solutions, relying on professional consultants with expensive equipment, often result in delays and lack of locally relevant data. Existing drone operation tools are mostly proprietary and not designed for large-scale collaborative efforts, limiting their effectiveness for community-driven projects.
13+
14+
## Solution
15+
16+
**Drone TM** offers a solution to these challenges by empowering communities to utilize drones for immediate and locally relevant mapping needs. Our platform:
17+
18+
- Provides a user-friendly, inclusive application enabling anyone with a drone, including inexpensive consumer or DIY drones, to contribute to a global repository of free and open aerial imagery.
19+
- Facilitates community-driven drone operations, ensuring immediate response and responsible mapping that considers local needs.
20+
- Coordinates aerial survey activities among multiple pilots through an open-source tasking platform, incorporating tools and processes to ensure coordinated flight plans for effective imagery acquisition.
21+
- Offers a seamless pipeline for processing and dissemination of the collected imagery.
22+
23+
## Vision
24+
25+
Our vision is to create a platform that is not only accessible and user-friendly but also inclusive, enabling widespread participation in creating high-resolution aerial maps. By leveraging the power of community-operated drones, we aim to build a resilient and responsive solution that addresses the needs of low-income and disaster-prone areas.
26+
27+
## Features
28+
29+
1. **Crowdsourced Mapping**: Empower drone pilots to contribute to a global imagery repository.
30+
2. **Community-Driven Operations**: Enable communities to use drones for immediate and locally relevant mapping.
31+
3. **Open-Source Platform**: Coordinate aerial surveys with an open-source tasking platform.
32+
4. **Seamless Pipeline**: Ensure smooth processing and dissemination of imagery data.
33+
5. **User-Friendly Application**: Designed for ease of use, allowing even non-professional pilots to contribute.
34+
35+
### Supported Drones
36+
37+
To see a list of supported and unsupported drones, please visit
38+
the [FAQ](https://hotosm.github.io/drone-tm/about/faq/#q-what-drones-are-supported) page.

Diff for: src/backend/app/db/db_models.py

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
UserRole,
2727
State,
2828
RegulatorApprovalStatus,
29+
ImageProcessingStatus,
2930
)
3031
from sqlalchemy.orm import (
3132
object_session,
@@ -155,6 +156,11 @@ class DbProject(Base):
155156
regulator_approval_status = cast(
156157
RegulatorApprovalStatus, Column(Enum(RegulatorApprovalStatus), nullable=True)
157158
)
159+
image_processing_status = cast(
160+
ImageProcessingStatus,
161+
Column(Enum(ImageProcessingStatus), default=ImageProcessingStatus.NOT_STARTED),
162+
) # status of image processing
163+
158164
regulator_comment = cast(str, Column(String, nullable=True))
159165
commenting_regulator_id = cast(
160166
str,

Diff for: src/backend/app/gcp/gcp_routes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async def find_images(
3030
fov_degree = 82.1 # For DJI Mini 4 Pro
3131
result = await project_schemas.DbProject.one(db, project_id)
3232
return await gcp_crud.find_images_in_a_task_for_point(
33-
project_id, task_id, point, fov_degree, result.altitude
33+
project_id, task_id, point, fov_degree, result.altitude_from_ground
3434
)
3535

3636

@@ -48,5 +48,5 @@ async def find_images_for_a_project(
4848
task_id_list = await list_task_id_for_project(db, project_id)
4949

5050
return await gcp_crud.find_images_in_a_project_for_point(
51-
project_id, task_id_list, point, fov_degree, result.altitude
51+
project_id, task_id_list, point, fov_degree, result.altitude_from_ground
5252
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
"""image_processing_status
2+
3+
Revision ID: f78cde896334
4+
Revises: b18103ac4ab7
5+
Create Date: 2025-01-15 05:11:08.788485
6+
7+
"""
8+
9+
from typing import Sequence, Union
10+
11+
from alembic import op
12+
import sqlalchemy as sa
13+
14+
15+
# revision identifiers, used by Alembic.
16+
revision: str = "f78cde896334"
17+
down_revision: Union[str, None] = "b18103ac4ab7"
18+
branch_labels: Union[str, Sequence[str], None] = None
19+
depends_on: Union[str, Sequence[str], None] = None
20+
21+
22+
def upgrade() -> None:
23+
# Create the enum type in the database
24+
image_processing_status_enum = sa.Enum(
25+
"NOT_STARTED",
26+
"PROCESSING",
27+
"SUCCESS",
28+
"FAILED",
29+
name="imageprocessingstatus",
30+
)
31+
image_processing_status_enum.create(
32+
op.get_bind()
33+
) # Bind the enum type to the database
34+
35+
# ### commands auto generated by Alembic - please adjust! ###
36+
op.add_column(
37+
"projects",
38+
sa.Column(
39+
"image_processing_status",
40+
sa.Enum(
41+
"NOT_STARTED",
42+
"PROCESSING",
43+
"SUCCESS",
44+
"FAILED",
45+
name="imageprocessingstatus",
46+
),
47+
nullable=False,
48+
server_default=sa.text("'NOT_STARTED'"),
49+
),
50+
)
51+
52+
# ### end Alembic commands ###
53+
54+
55+
def downgrade() -> None:
56+
# ### commands auto generated by Alembic - please adjust! ###
57+
op.drop_column("projects", "image_processing_status")
58+
59+
# Drop the enum type from the database
60+
image_processing_status_enum = sa.Enum(
61+
"NOT_STARTED",
62+
"PROCESSING",
63+
"SUCCESS",
64+
"FAILED",
65+
name="imageprocessingstatus",
66+
)
67+
image_processing_status_enum.drop(op.get_bind()) # Drop the enum type
68+
69+
# ### end Alembic commands ###

Diff for: src/backend/app/models/enums.py

+14-5
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,15 @@ class RegulatorApprovalStatus(IntEnum, Enum):
7474
REJECTED = 2
7575

7676

77+
class ImageProcessingStatus(IntEnum, Enum):
78+
"""Enum to describe all possible statys of a Image Processing for a Project"""
79+
80+
NOT_STARTED = 0
81+
PROCESSING = 1
82+
SUCCESS = 2
83+
FAILED = 3
84+
85+
7786
class ProjectVisibility(IntEnum, Enum):
7887
"""Enum describing task splitting type."""
7988

@@ -200,11 +209,11 @@ class EventType(str, Enum):
200209

201210

202211
class FlightMode(str, Enum):
203-
"""The flight mode of the drone.
204-
205-
The flight mode can be:
206-
- ``waylines``
207-
- ``waypoints``
212+
"""
213+
The flight mode of the drone.
214+
The flight mode can be:
215+
- ``waylines``
216+
- ``waypoints``
208217
"""
209218

210219
waylines = "waylines"

Diff for: src/backend/app/projects/image_processing.py

+18-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import shutil
66
from pathlib import Path
77
from app.tasks import task_logic
8-
from app.models.enums import State
8+
from app.models.enums import State, ImageProcessingStatus
99
from app.utils import timestamp
1010
from app.db import database
1111
from app.projects import project_logic
@@ -183,7 +183,7 @@ async def _process_images(
183183

184184
# Start a new processing task
185185
task = self.process_new_task(
186-
images_list,
186+
list(set(images_list)),
187187
name=name
188188
or (
189189
f"DTM-Task-{self.task_id}"
@@ -352,6 +352,7 @@ async def process_assets_from_odm(
352352
message=None,
353353
dtm_task_id=None,
354354
dtm_user_id=None,
355+
odm_status_code: Optional[int] = None,
355356
):
356357
"""
357358
Downloads results from ODM, reprojects the orthophoto, and uploads assets to S3.
@@ -443,6 +444,21 @@ async def process_assets_from_odm(
443444
conn, dtm_project_id, dtm_task_id, "assets_url", s3_path_url
444445
)
445446

447+
if not dtm_task_id:
448+
# Update the image processing status
449+
pool = await database.get_db_connection_pool()
450+
async with pool as pool_instance:
451+
async with pool_instance.connection() as conn:
452+
await project_logic.update_processing_status(
453+
conn,
454+
dtm_project_id,
455+
(
456+
ImageProcessingStatus.SUCCESS
457+
if odm_status_code == 40
458+
else ImageProcessingStatus.FAILED
459+
),
460+
)
461+
446462
except Exception as e:
447463
log.error(f"Error during processing for project {dtm_project_id}: {e}")
448464

Diff for: src/backend/app/projects/project_logic.py

+28-3
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@
3838
create_placemarks,
3939
terrain_following_waylines,
4040
)
41-
from app.models.enums import FlightMode
41+
from app.models.enums import FlightMode, ImageProcessingStatus
4242

4343

4444
async def get_centroids(db: Connection):
4545
try:
4646
async with db.cursor(row_factory=dict_row) as cur:
47-
await cur.execute("""
47+
await cur.execute(
48+
"""
4849
SELECT
4950
p.id,
5051
p.slug,
@@ -61,7 +62,8 @@ async def get_centroids(db: Connection):
6162
task_events te ON t.id = te.task_id
6263
GROUP BY
6364
p.id, p.slug, p.name, p.centroid;
64-
""")
65+
"""
66+
)
6567
centroids = await cur.fetchall()
6668

6769
if not centroids:
@@ -335,6 +337,25 @@ async def process_drone_images(
335337
)
336338

337339

340+
async def update_processing_status(
341+
db: Connection, project_id: uuid.UUID, status: ImageProcessingStatus
342+
):
343+
print("status = ", status.name)
344+
"""
345+
Update the processing status to the specified status in the database.
346+
"""
347+
await db.execute(
348+
"""
349+
UPDATE projects
350+
SET image_processing_status = %(status)s
351+
WHERE id = %(project_id)s;
352+
""",
353+
{"status": status.name, "project_id": project_id},
354+
)
355+
await db.commit()
356+
return
357+
358+
338359
async def process_all_drone_images(
339360
project_id: uuid.UUID, tasks: list, user_id: str, db: Connection
340361
):
@@ -363,6 +384,10 @@ async def process_all_drone_images(
363384
webhook=webhook_url,
364385
)
365386

387+
# Update the processing status to 'IMAGE_PROCESSING_STARTED' in the database.
388+
await update_processing_status(db, project_id, ImageProcessingStatus.PROCESSING)
389+
return
390+
366391

367392
def get_project_info_from_s3(project_id: uuid.UUID, task_id: uuid.UUID):
368393
"""

0 commit comments

Comments
 (0)