Skip to content

Commit

Permalink
prevent raster transforms with Geographic CRS
Browse files Browse the repository at this point in the history
  • Loading branch information
KatKatKateryna committed May 25, 2023
1 parent 4c19c56 commit ee1b71d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions speckle/converter/layers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def convertSelectedLayers(layers: List[Union[QgsVectorLayer, QgsRasterLayer]], s
if (attribute is None or str(attribute) not in layer.fields().names()) and "ignore" in transform_name:
logToUser("Attribute for extrusion not found", level = 2, plugin = plugin.dockwidget)
return None

elif isinstance(layer, QgsRasterLayer) and layer.name() == layer_name and "elevation" in transform_name:
if plugin.dataStorage.project.crs().isGeographic():
logToUser("Raster layer transformation cannot be applied when the project CRS is set to Geographic type", level = 2, plugin = plugin.dockwidget)
return None

result.append(layerToSpeckle(layer, projectCRS, plugin))

Expand Down

0 comments on commit ee1b71d

Please sign in to comment.