Cross-Platform Mobile Development for Spatial Biological Databases Csaba Szugyiczki, Viktoria Kurjak, Gergely Kovasznai, Miklos Ban ICAI 2017 Januar 31, 2017 Eger, Hungary
OpenBioMaps http://openbiomaps.org Biological databases Queries Open data Free Exportable data Databases of unique structure. Example: Database with unique and complicated structure about parasites and their hosts. Unique databases Customizable interfaces Importable data
Used by Whom and for What? Environment protection: National park (Duna-Ipoly NP, Bükk NP) Social associations (Milvus Group, Romania) Research: Universities (University of Debrecen, Eotvos Lorand University, Eszterhazy Karoly University) Research centres (Senckenberg Biodiversity and Climate Research Centre (BiK-F), Germany) Data collection Data management Data sharing
OpenBioMaps Server background Linux host servers Apache webserver Standard relational database backend PostgreSQL Standard OGC compatible GIS (Geographic Information System) tools PostGIS Mapserver ogr2ogr, gpsbabel PostGIS: A GIS extension of postgreSQL. MapServer: A standard open source platform for publishing spatial data and interactive mapping applications to the web. OGR2OGR, GPSBABEL: Popular GIS tools. ogr2ogr is part of the GDAL (Geospatial Data Abstraction Library of OSGEO ( Open Source Geospatial Foundation)) We use these well-known, popular and standard GIS tools for importing, converting, transforming, organizing and visualizing GIS data.
OpenBioMaps DB Network Private Users Node 5. Duna-Ipoly NP Budapest Node 4. MILVUS Marosvasarhely Node 1,2. DE Debrecen Node 3. ELTE Budapest Node 7. Bukk NP Budapest Node 6. BikF Frankfurt Private Users data connection archive connection Public Users
OpenBioMaps DB Structure Operational Database GIS Database Projects' metadata tables Translations Statistics Logs User informations OAuth2 Forms Projects' tables History tables Temporary tables Shared data GIS connection WEB & API interface 2019.04.09.
What is the Problem to Solve? When collecting data on site, how to upload it into OBM? (Lame) Solutions: Users write their notes on paper which then need to be entered on computer. Why to do the work twice? Users use their computers on site. Do I need to carry my notebook everywhere? Users use different available mobile applications for collecting different types of data. Do I need to switch between apps? IoT, EKU, consortium. Alternative apps for data collection. Not unified. Solution: Dedicated OBM mobile application
Android App Data are bound to geographics coordinates. Recording the position by Using the phones’s GPS. Entering manually. Choosing on the online map. Recorded position can be visually checked on map. Developed in Android Studio.
Android App Components of notes: Text note Position + date and time Sound recording Photos 2019.04.09.
Android App Saved notes can be exported as .zip files to phone’s memory. Data can be archived or processed later by other applications. Saved notes are automatically uploaded to the server when being online. Uploading to the server: Retrofit Background synchronization when being online: SyncAdapter Retrofit: Less code is necessary for the app to access the internet. SyncAdapter: Encapsulates those codes that are necessary for exchanging data between the client and the server.
Further Requests from Users „What if my phone’s operating system is not Android?” „Could you please make the form elements fully customizable?” „Is it possible to automatically fill the form elements that are frequently used?” „Let’s develop a cross-platform mobile application!” 2019.04.09.
Cross-Platform Application Browser and platform independent Using HTML5, CSS or SASS, JavaScript or TypeScript Instead of platform-specific APIs Has to be developed only once Instead of developing a separate native app for each platform Unified outlook and functions on all the platforms Disadvantage: Slower than native apps Angular2 + Apache Cordova + Ionic2 Angular2: To load dynamic forms ( + SPA = Single Page Application --- more dynamic apps). Cordova+Ionic : To develop to mobil devices by using web technologies. Cordova: To access native functionalities (e.g., GPS, camera, internet). Ionic: Provides CLI (Command Line Interface) -> We can use simple command-line commands for e.g. creating a project.
How to the OBM cross-platform app? The user constructs the form he/she needs on PC, w.r.t. the database. The user uploads the form to the server. The OBM app downloads the form from the server (JSON). The user fills the form on site which is saved to the phone’s database (SQLite). No internet connection is required! Later, when being online, the app uploads the filled form to the server (JSON). 2019.04.09.
How does this work?
How to Create a Form? Form name Table name Access (public, private) Form type Here you can give the name of the form, which table it relates with, what its accessibility is, what the form’s type is.
How to Create a Form? Include? Column Required Description Type Length Default value 2019.04.09.
Form Elements (JSON) [ { key: 'date', label: 'Date', value: 'auto-fill', type: 'date', required: true, order: 1 }, key: 'position', label: 'Position', type: 'gps', order: 2 key: 'note', label: 'Note', type: 'text', required: false, order: 3 } ] 2019.04.09.
Data (JSON) SQLite Database { date: "2017-01-31T19:55:14", position: {lat: "47.684378", lon: „19.765450"}, note: „Deer" } SQLite Database
Conclusion Platform independent Customizable forms Multilingual user interface Data assigned to geographics positions Form functionality (to save and/or automatically fill the content of certain fields) Future work: Tracklog functionality Data assigned to polygons (instead of points) User management Using offline maps
Thank you for your attention!