ARCHITECTING LOCATION INTELLIGENCE PLATFORMS USING OPEN-SOURCE COMPONENTS

: Location Intelligence is an emerging application of geospatial industry. It allows professionals from different business domains (finance, disaster management, retail, health) and with minimum expertise in GIS technologies to use efficiently many spatial analysis tools and algorithms to solve their day-to-day problems. One of the major characteristics of Location Intelligence is the use of multisource and alternative data either user ingested or directly available in the platform (by geo-enrichment). In this contribution we investigate the architectural challenges raised by the development of this kind of platforms, particularly in term of functionalities, use of open-source components, management practices, deployment on the Cloud and source code control. To validate our assumptions, we built a new platform, named “Geoweba”, based on the GeoNode Project and having as objective to disrupt the Algerian consulting market. The resulting platform is deployed on the internet and freely available for users. In this contribution we demonstrate that our development approach based on Agile principles and open-source components gives a good result, mainly in the early stages when just a Minimum Viable Product (MVP) is needed for market validation of the idea.


INTRODUCTION
Location intelligence software, also called spatial intelligence software, is a business intelligence solution that provides location analytics to identify the relationship between certain objects based on their physical locations. Location intelligence tools enable users to see trends on maps and graphics to optimize certain business opportunities (G2, 2021). Noticing a lack in geospatial technologies adoption by businesses in our Country (Algeria), we decided to develop and deploy a cloud-based location intelligence platform to simplify the ingestion, the management, the visualization and the analysis of open and homemade spatial datasets.
To accelerate the speed of development of our platform we investigate the use of open-source components to build a Minimum Viable Product (MVP). The resulting Agile built platform named "Geoweba" was deployed into a cloud-based virtual machine and made freely available for users.

Software modules roadmap
To architect the location intelligence platform, we used an Agile approach combining Lean Start-up process and Scrum rituals, which allows us to improve continually our solution using final user feedbacks. Also, this kind of approach give us the flexibility to update incrementally our TODO list of features (Backlog) and to build iteratively and as needed the required software modules in the form of a GeoApp (Geospatial Application) (Figure 1).
To keep on track, the World Bank Doing Business process (World Bank. 2020) has been used as a roadmap and each GeoApp is related to one of the generic business development cycle, nominally: opening a business, getting a location, accessing finance, dealing with day-to-day operations, operation in a secure business environment.

Functionalities identification
For the kick-off, we built a list of location intelligence platforms common features by analyzing all major commercial brands deployed worldwide (J. McCormick and E. Miller, 2019) and we compare them to the features already implemented in one of the most active open-source projects, namely GeoNode (Corti P, Bartoli F, Fabiani A, Giovando C, Kralidis AT, Tzotsos A. 2019). This gap analysis (Table 1) was the genesis of the targeted platform backlog and serves as roadmap for the upcoming development activities. Non-functional requirements were also identified from the previous analysis, particularly mail confirmation and social login which are critical for user experience, and also Backup and restoration which are critical for the availability.

ARCHITECTURE CONSIDERATIONS
Location intelligence platforms are complex systems involving many interactions between heterogonous components both internal and external to the organization, particularly when they are deployed on a public cloud infrastructure which rises many privacy challenges.

IT Management practices
For operations purposes, best practices in the IT services management should be used to keep the development-testingproduction pipeline under control (ESRI, 2020). It is also highly recommended to use DevOps principles like version control and containerized environment for development purposes. For testing, a stagging environment should be setup in a local virtual machine and updated with the latest software modules and data to avoid any production deployment problems. Production environment should be monitored closely and any incident must be documented and reviewed periodically during the Sprint Retrospective.

Programming languages
Programming languages are also critical concern, because not all languages give the same access to the frequently used frameworks and analysis tools, particularly artificial intelligence and machine learning packages. Languages like Python, Java and JavaScript allows developers to simply access a huge amount of high-quality battletested algorithms that can make the difference from a customer point of view.  Table 2. List of open-source geospatial project.

Functional requirements
The functional requirements to implement include: Ingestion, Management, Visualization and Analysis of geospatially enabled datasets both homemade and imported/reformatted from external sources. To achieve that, many software components must be configured to work together efficiently as a SaaS (Software as a Service) solution in a cloud environment ( Figure 2

Geoweba platform
Applying all the principles described before, we built and deployed on the internet an SaaS Location Intelligence platform named "Geoweba" (Geospatial Web for Algeria), based on GeoNode Project (GeoNode Project Contributors, 2021) and available at the following address: https://geoweba.transformatek.dz.
Geoweba targets entrepreneurs with limited resources and who lack market Insights. It simplifies the business analysis of the locally targeted value streams and unlike traditional consulting methods, Geoweba is built on cutting edge spatial data science technologies merging user ingested data with a large collection of Geo-Enabled datasets collected from various open and alternative sources. It includes three main components: Data Layers, Maps and GeoApps.

Dataset production process
An important component of any Location Intelligence Platform is its owned datasets (layers) that can be used directly in spatial analysis operations or combined with user ingested data by geoenrichment. To produce those datasets of points of interests (POI), covering the Algerian territory and required for Geoweba to be fully operational, a Data Science inspired process was implemented including: Data engineering, Geocoding, Quality Check, Storage Management and Sharing at the end (Table 3).

GeoApps Development
Developing specific spatial analysis tools (GeoApps) for each business need is a challenging task, particularly when undertaken using frequently updated open-source components. In our case we use GeoNode Project, which is mainly based on the python Django framework for the backend and the frontend. But with the integration of MapStore2 Client in GeoNode 3.x, a big part of the front end is now based on the React JavaScript Framework with its corresponding backend API (Application Programming Interface) implemented with Django REST Framework.
Therefore, Geoweba GeoApps are developed by inheriting the GeoNode GeoApp class ( Figure 3) and a specific serialization mechanism is implemented to allow REST API calls by the frontend developed using ReactJS and Material UI. The big advantage of this design is the freedom given to the GeoApp developer to store any kind of user related parameters in one JSON object (GeoAppData class), stored as a blob in the database and easily consumable by frontend JavaScript part of the application.

Source control
When working with open-source components, source code control became a huge challenge, especially with upstream active projects having new commits every day. It's become more complicated when our built components inherit their behavior from those externally managed software packages. If we don't strictly respect the above-mentioned best practice of having a stagging environment, applying untested changes can be harmful to the production environment and may cause service interruption and data loss.
To avoid that, the strict branching system shown in Figure 4 has been be put in place to keep production source code under control.
Firstly, the two (02) upstream repositories with the HEAD branches of GeoNode and Mapstore2-client has been forked to an organization owned account on Github and cloned to the local development environment with the upstream set to the GeoNode organization repositories.
Assuming that the HEAD of the forked repositories must keep in sync with the upstream, new branches has been created for our future contributions to the GeoNode project and a specific branch for our production environment with all necessary customizations and rebranding modifications has been created. In the development environment, we can have as many branches as needed, like branches for User Interface /eXperience (UI/UX), translations, bug fixes and a branch for each GeoApp under development.
The most important branch in the development environment is of course the main (master/HEAD) branch, which has to be in sync with our production deployed binaries. Any modification in this branch must be done with a pull request which should be reviewed by as many team members as possible before its merge. Finally, a proper documentation and comments should be maintained by the team to ease the code understanding and reusability.
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B4-2021 XXIV ISPRS Congress (2021 edition)

Containerization
To keep the development process in sync with the frequent updates in the source code it is recommended to use virtualization technologies whereby each virtual machine is providing a given service. This eliminates the need to install and administrate application dependent software packages and libraries on the physical processing nodes. It also avoids the problem of applications having conflicting library requirements. (Soille, P., Burger, A., De Marchi, D., Kempeneers, P., Rodriguez, D., Syrris, V., & Vasilev, V., 2018).
Key advantage of using GeoNode community driven project is the preconfigured docker compose containerized settings which are available in two flavors: development and production-like.
In the development setting (Figure 5), the Django debug flag is set True and the Paver Python-based build/distribution/deployment scripting tool is used to create the web development server. Hence, when building the solution, separate docker images are created for each software component of the stack, nominally: PostGIS database, Elasticsearch, RabbitMQ, Celery, Geoserver, Django and Nginx. Also, a specific network and volumes are created for intra container communications and data storage. In the production-like setting (Figure 6), the uWSGI Python web server is used instead of Paver and docker images are created for the following software components: PostGIS database, RabbitMQ, Celery, Geoserver, Django, Letsencrypt, Jenkins and Nginx.

RESULTS AND DISCUSSIONS
In this contribution we investigated the use of open-source components to architect a Location Intelligence platform. This approach allows us to quickly build an MVP and to bring it to the final user for feedback and continuous improvement. It has been proven that using best practices in IT service management and Agile approaches is well suited for this kind of projects.
Most important challenges of using open-source components have been highlighted and some solutions has been proposed for teams working in this kind of projects.
The final choice of GeoNode (GeoNode Contributors, 2021) as a starting point for the proposed location intelligence platform is also justified because the system complies to all non-functional and functional requirements defined herein.
The resulting Location Intelligence platform (Geoweba) is a demonstration of the suitability and relevance of the Agile/DevOps approach discussed in this contribution.