App 2 details
About
App 2 is designed as the viewer and querying tool for the generated orthomosaics
App 1 allows users to upload folders with drone images, and app 1.5 is triggered once the data is transferred using globus. App1.5 then updates the database to have the details about the processed orthomosaic.
Github Repositories
Frontend: https://github.com/precision-sustainable-ag/drone-image-manipulation
Backend: https://github.com/precision-sustainable-ag/drone-image_processing-api
Home Page (Page 1)
The first page presents a spatial and time-based query tool to the user. They first select a region and then a time range for getting the orthomosaics they are interested in.
Design decisions
We have chosen to only store orthos within a year’s range. This will be implemented once a lifecycle decision is made on data storage.
Technical implementation details
The world map is generated from OpenStreetMap. The spatial query ploygon’s coordinates are checked against
flight_bounding_box_3857
field in the database (WSG:3857 is the CRS for both these fields)The start and end time are different mui datepicker components with an added check of making sure the start date is before the end date. These dates are checked against
mission_start_time
GeoTIFF page (Page 2 - /explore)
The aim of the second page is to allow users to select an orthomosaic they are interested in from the sidebar and then draw their plot boundaries. The users tells us the number of columns and rows in their experiment (i.e. the grid that defines their plot boundaries). The user is also allowed to move the grid after it is drawn.
The user also defines their walk method i.e. what corner they started collecting data from and how they walked the path - serpentine or deadheaded. This is useful for assigning plot numbers. The default values are top left corner and deadheaded walk.
The user is also required to add some field features along with some optional field features:
Crop (required)
Leading scientist (required)
Insect data collected? Yes/No - details if yes
Disease data collected? Yes/No - details if yes
Planting date
Harvest date
Short description of how the data will be used
Design decisions
Users are only allowed to draw one grid
Users cannot yet edit individual plot boundaries and we assume that all plots are perfectly rectangular
Users rotate the map instead of rotating the grid after drawing it
Users cannot yet add details about alleyways
For V1, the field details collected are not stored because these details are specific to the plots and not the whole orthomosaic. Currently, these plots are not stored either.
Technical implementation details
The flight data sidebar is populated based on the users' query on the previous page. The
display_name
field in the database determines what will be displayed in the sidebarThe map component displays a cloud optimized geotiff (COG) of the orthomosaic for the flight that the user selected from the sidebar. These COGs are generated as part of app 1.5’s workflow. Users can also rotate the map using shift + cursor movement.
A vector layer is present on top of the COG for the plot boundaries. This vector layer allows users to draw a box to capture the complete area they are interested in. Once the user has selected a box, grid lines are draw inside it using a custom draw function. The grid lines are determined by identifying intersection points on the horizontal and vertical boundaries. The code also takes care of rotated polygons (happens if the user rotates the orthomosaic).
Plot details page (Page 3 - /plot-features)
A map component shows the plot boundaries based on the previous page. The grid also has a layer of information that displays the plot names. These plot names correspond to the plot names in the table below. The user can rotate the map here as well.
A table shows the users the plot numbers, plot names and the average values of vegetation indices for the plots. Indices displayed - NDVI and LAI for multispectral images. TODO @Jinam : GLI and VARI for RGB images. The user is allowed to edit the plot names in the table.
Technical implementation details
The vegetation indices for each orthomosaic are precomputed and stored (like a layer for the whole orthomosaic). For each plot, this file is partially read (using windows based on coordinate data). This partial reading of data for each plot is done using multithreading along with a read lock.