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

Tracking setup for mobile application #489

Merged
merged 9 commits into from
Aug 21, 2023
Merged

Tracking setup for mobile application #489

merged 9 commits into from
Aug 21, 2023

Conversation

alexbruy
Copy link
Contributor

Add a new group to the Mergin project properties widget to setup tracking. User can activate/deactivate tracking and select desired tracking precision.
image
Tracking configuration then saved in the QGIS project file and will be used by mobile application.

If this is a first activation of tracking a new GPKG file called tracking_layer.gpkg with a LineStringZM layer will be created in the Mergin project folder and added to the project. Note, we require project to be saved before enabling tracking as otherwise we can not determine where to put GPKG file.

Peek 2023-03-31 12-45

Copy link
Contributor

@tomasMizera tomasMizera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alexbruy 🎉

I have few suggestions:

  • let's set fid field to be hidden
  • let's have only 2 decimal places in the total_distance

I also found this issue:

  • make basic project through plugin
  • add tracking
  • add new feature to tracking layer (in plugin)
  • after saving the layer, this feature is not visible on map
    • I do not even see it in attribute table (maybe missing commit to layer?)

then, I could not sync the project because of

2023-04-26T16:13:38     WARNING    Traceback (most recent call last):
              File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/plugin.py", line 411, in current_project_sync
              self.manager.project_status(self.mergin_proj_dir)
              File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/projects_manager.py", line 168, in project_status
              pull_changes, push_changes, push_changes_summary = self.mc.project_status(project_dir)
              File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/client.py", line 826, in project_status
              push_changes = mp.get_push_changes()
              File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/merginproject.py", line 327, in get_push_changes
              size, checksum = do_sqlite_checkpoint(self.fpath(file["path"]), self.log)
              File "/Users/tomasmizera/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/Mergin/mergin/utils.py", line 93, in do_sqlite_checkpoint
              cursor.execute("PRAGMA wal_checkpoint=FULL")
             sqlite3.OperationalError: disk I/O error

I could use it in MM mobile though :)

@alexbruy
Copy link
Contributor Author

Suggestion applied (they were not presented in the specification).

As for the issue, I can't reproduce it on Linux and Windows
Peek 2023-04-27 09-02

User can enable or disable tracking as well as choose desired tracking
precision. On the first activation plugin will automatically create a
new GPKG with the tracking layer and add it to the project.
@tomasMizera tomasMizera merged commit 7de96e6 into master Aug 21, 2023
7 checks passed
@tomasMizera tomasMizera deleted the tracking-setup branch August 21, 2023 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants