Project

GeoPortOst - a project that allows users to find, study, and download maps that are projected onto the current map of the Earth. Initially, it was based on the GeoBlacklight platform, but due to optimization issues, it was decided to create a proprietary solution that allows for more flexible work with data and the website.

Origins of the Project:

Solutions

This project is based on Django, a library that allows you to create websites and work with databases at the code level (ORM). To ensure the site's connection to the Internet, we use:

  • Nginx high-performance, open-source web server, reverse proxy, load balancer, and HTTP cache, renowned for its low resource consumption and speed
  • Gunicorn Python Web Server Gateway Interface (WSGI) HTTP server.

In our case, the database is PostgreSQL, which provides many useful features compared to the standard solution used by Django. We also use a list of external services to provide a set of features when using the site. This list includes:

  • Geoserver source of projected maps optimized for display
  • IIIF source of unprojected scanned images optimized for display

They are located completely independently of the server hosting the project, which ensures that the load is distributed and that the site will not become unavailable in the event of an error.

Server relationship graph

Visual

In turn, to display the pages themselves, we use several libraries that provide a list of functions that have long been considered standard. To design the pages, we use the Bootstrap style and icon library, which is customized to our needs and includes the most important elements and styles for them.

Search page created using Bootstrap

For the technical part of the site, we naturally use jQuery, which extends the set of functions of standard JavaScript and is also necessary for other libraries to work.

Leaflet, another popular JavaScript library that has been slightly extended for the needs of the project, is responsible for displaying and managing maps on the site. It works directly with Geoserver and IIIF, which were mentioned above.

Technical Details

In this category, you can learn more about the technical features, decisions made during development, and solutions we used to overcome the challenges we faced.

Django

Django is a library for Python that manages page display, request processing, and provides administrative functions for the team. The library provides a wide range of different functions that are not only convenient but also, if necessary, customizable for specific project requirements.

Localisation

The localization system allows us to fully control the translation of our project. Initially, there was no localization support at the database level, so we used the django-localized-fields library, which uses keys and values to store text individually for each language, while also offering administration functions and database support at the query level.

Object-Relational Mapping

The main feature of Django is ORM, a system that directly connects the database to the project code. Each record and table represents a class in the code, which is automatically converted after a request is sent and can also have its own functions and parameters, which greatly simplifies development.

Since Django only sends requests when attempting to convert a request into an object, this dramatically improves performance. We tried to use only database-level queries, as this is the most optimized way to query data. When using Python functions, there was a noticeable difference in performance.

Leaflet

To display and manage the map, we used Leaflet, which also allows you to customize its behavior and add new features.

Interactions

We added the ability to select a region on the map, which acts as the start and end point of the selection. After receiving this data, we query the database and compare the coordinates at the query level, which is a very fast operation. Depending on the type of overlap, we use different approaches to filtering maps, which gives the user more control.

Geoserver/IIIF

Since Leaflet is only a tool for managing data, we decided to use IIIF and Geoserver to provide it in a ready-made form. Both services send images in pieces so that users do not have to download the entire image. This speeds up loading and reduces the load on the device.

The main difference between these two services is that Geoserver provides geographic information on a world map to show the user a projected map. IIIF, on the other hand, offers the original image.