Skip to content

Commit

Permalink
Change minimum QGIS version to 3.28
Browse files Browse the repository at this point in the history
  • Loading branch information
mdouchin committed Nov 28, 2024
1 parent b4e449a commit bfdd0cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gobs/metadata.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[general]
name=G-Obs
qgisMinimumVersion=3.16
qgisMinimumVersion=3.28
description=This plugin provides tools to store and manage spatial and time data in a standardized way

# Done by qgis-plugin-ci
Expand Down
10 changes: 8 additions & 2 deletions gobs/processing/algorithms/import_spatial_layer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import processing

from qgis.core import (
Qgis,
QgsExpressionContextUtils,
QgsProcessingException,
QgsProcessingOutputString,
Expand Down Expand Up @@ -286,8 +287,13 @@ def processAlgorithm(self, parameters, context, feedback):

# Get vector layer geometry type
# And compare it with the spatial_layer type
source_type = QgsWkbTypes.geometryDisplayString(sourcelayer.geometryType()).lower()
source_wtype = QgsWkbTypes.displayString(sourcelayer.wkbType()).lower()
if Qgis.versionInt() < 33400:
source_type = QgsWkbTypes.geometryDisplayString(int(sourcelayer.geometryType())).lower()
source_wtype = QgsWkbTypes.displayString(int(sourcelayer.wkbType())).lower()
else:
source_type = QgsWkbTypes.geometryDisplayString(sourcelayer.geometryType()).lower()
source_wtype = QgsWkbTypes.displayString(sourcelayer.wkbType()).lower()

if not target_type.endswith(source_type):
msg = tr('Source vector layer and target spatial layer do not have compatible geometry types')
msg+= ' - SOURCE: {}, TARGET: {}'.format(
Expand Down

0 comments on commit bfdd0cc

Please sign in to comment.