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

All calls necessary to create ODK projects for 3dStreetView #4

Open
ivangayton opened this issue Jun 30, 2021 · 1 comment
Open

All calls necessary to create ODK projects for 3dStreetView #4

ivangayton opened this issue Jun 30, 2021 · 1 comment
Assignees

Comments

@ivangayton
Copy link
Contributor

Create projects for 3dStreetView on ODK Central server

It's possible to create an ODK project that works reasonably well to collect photos for a 3dStreetView mesh. The full ODK Central dashboard works for this purpose, but it's much more complicated than it needs to be. It would be preferable for 3dStreetView users to be able to create a new project properly configured for photo collection directly from the 3dStreetView dashboard with a single action.

In ODK Central's web interface, the steps to create a working project are:

  • Log in
  • Create a Project
  • Upload 3dStreetView forms (for now two: the main photosphere form and the fill-in photo form)
  • Publish the forms (which when initially uploaded are considered drafts, and are not published/accessible)
  • Create an App user (for example with the name surveyor)
  • Grant the App user access to the forms
  • Retrieve a QR code for the App user, which can be distributed to the people who will be taking the photos to configure the ODK Collect app on their phones.

In the proposed 3dStreetView dashboard, the workflow would simply be:

  • Click New Mesh
  • Add a name
  • [Optional] Add a location or polygon area
  • [Optional] Choose a pre-configured project type with a specific set of pre-defined forms (if you don't do this you get the default project type)
  • Press Create
  • Copy or share the resulting QR code

What needs to be implemented

The current fetch.py library (being renamed central.py) contains functions that wrap API calls to ODK Central in reasonably idiomatic Python functions that return Requests objects (this was originally created to bypass the built-in ODK Central feature to bundle up all submissions and data from a form into a downloadable Zip file, which fails miserably for large datasets due to memory constraints and/or connection issues).

However, the library doesn't yet implement all of the features needed to build a project for 3dStreetView. The create_project function works, but there aren't yet functions to:

  • Upload forms
  • Publich forms to a particular project
  • Create App users in a particular project
  • Grant access to specific forms to an App user in a project
  • Retrieve the QR code for an App user

That's the job! Implement all of those API calls as Python functions in the central.py (formerly fetch.py) library.

@ivangayton
Copy link
Contributor Author

ivangayton commented Jun 30, 2021

@hcwinsemius FYI: here's the project @ReettaValimaki will implement in the create-project branch. When it's done, we'll be able to add a straightforward project creation function to the 3dStreetView dashboard that will take care of all of the management of the projects on the ODK server. Users won't need to see, or have credentials on, the ODK server at all.

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

No branches or pull requests

3 participants