This is the backend component of Widesight Service application. It is a django app based on Django REST Framework that exposes a REST interface for creating and mantaining a street level images and derived objects database
https://github.com/enricofer/wide_sight_frontend
https://github.com/enricofer/wide_sight_utils
Manually install GDAL and related python library for your platform. GDAL version and related python bindings version must be the same.
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt install gdal-bin=3.0.4
pip install GDAL==3.0.4
local clone the repository than install the remaining needed python library requirements:
pip install -r requirements.txt
In order to run the application a geodatabase must be installed, spatialite for testing and development postgis for production
configure ws/settings.py
specifying database backend (demo on spatialite backend) then migrate database from scratch.
python manage.py migrate
Create an admin user for testing keep the suggested credential that are syncronized with the included viewer webapp
DJANGO_SUPERUSER_PASSWORD=letmein python manage.py createsuperuser --username admin --email admin@email.com --noinput
or interactively
python manage.py createsuperuser
run development service (by default localhost on port 8000):
python manage.py runserver
The service manage listing , creation and editing of three five sets of objects:
-
main
-
sequences: panorama containers
-
panoramas: geolocated equirectangular images with support informations
-
image objects: geolocated user recognized image objects (tags, spots, stereo measurements, etc...)
-
-
support
-
image objects types: custom image objects categories
-
userkey: userkeys user capabilities (geofencing, allowed appkeys)
-
appkeys: allowed application keys (needed for GET method without user authorization)
-
the complete API reference is available at docs/API.html
Authenticate as the previously defined user and point to http://localhost:8000/admin
With the Admin interface is possible to load equirectangular images with the following workflow:
- define an appkey: http://10.10.21.50:8000/admin/wide_sight/appkeys/add/
- define a userker: http://10.10.21.50:8000/admin/wide_sight/userkeys/add/
- define a sequence: http://10.10.21.50:8000/admin/wide_sight/sequences/add/
- then manually load the panorama images: http://10.10.21.50:8000/admin/wide_sight/panoramas/add/
The image parameters (gps location, heading, pitch and roll) can be manually inserted or taken from EXIF tags if defined For massive insertion of images make use of https://github.com/enricofer/wide_sight_utils uploading util
integrated equirectangular viewer (https://github.com/enricofer/wide_sight_frontend)
The web interface include a build of the equirectangular widesight web viewer:
http://localhost:8000/viewer/ http://localhost:8000/viewer/[panorama id]