Antero Komi
Software developer mainly focused on QGIS & PostGIS applications, background in web development.
Sessions
This talk presents use of QGIS tools in topological editing of multiple simple features together and shows a SQL-based approach to checking the data in a PostGIS database to conform with given topological rules between multiple tables.
When using simple features in a PostGIS database, topological relations are not handled with the data model, data is duplicated on shared segments and thus may contain differences on segments which should be shared and equal between all features on that egde, and in QGIS each modification must also consider the topological vertices and possibly make changes to other features as well.
QGIS has built-in tools to handle some topological editing cases, this talk shows use cases for those and shows additional plugins available for making for example topological reshapes for shared segments, as if the segment was an edge in a topological data model.
This talk also discusses SQL-based methods for checking the topological consistency. Simple checks shown include the built-in PostGIS functions like intersects or contains. More advanced cases show use of relate-checks for allowing certain types of intersections, or distance-based exists checks for requiring either connected or clearly separate features for topographic data modeling. These kind of SQL checks also allow maintaining complex topological relation checks based on attributes of the features, and for example a shoreline-lake relation can be checked fully inside state boundaries, and gaps are allowed on those parts of lakes outside of state boundaries.
This talk presents different methods to handle dependencies to external libraries in QGIS plugins.
Compared to for example web development world there is no wide adoption of general-purpose QGIS libraries available nor a way to easily integrate such libraries into own plugin or library development. Also, some widely-used non-QGIS-specific libraries like pandas for data manipulation might be beneficial for QGIS plugins or libraries to use as well.
Built-in QGIS features include declaring dependency plugins, but the usage must rely on either accessing the plugin instance and its API, importing code of the plugin package in a guarded way, or using only for example the processing providers installed by such dependency plugins. For example, sharing and using general purpose GUI components, simple functions etc. with an external, possibly pip-installable dependency library is not straightforward and has many obstacles.
Some methods used include requesting dependency install manually from the user, using subprocess calls to install the dependencies automatically, shipping dependencies together with the plugin code and using import paths manipulation, or bundling the dependencies into the code and using replaced imports to point to the bundled library. Difficulties in some or all these approaches include possible version conflicts between different plugin requirements, version mismatches with the expected runtime and platform incompatibility.
This talk compares these different methods pros and cons, possible use cases for each, effect on the development workflow, and shows available tools for helping to use some of these methods.