diff --git a/translator/vector/process.py b/translator/vector/process.py index 9a19d4f..b19d3ac 100644 --- a/translator/vector/process.py +++ b/translator/vector/process.py @@ -119,7 +119,8 @@ def process_vector( result = _process_graduated(layer, extent, idx, output_dir) elif layer.renderer().type() == "singleSymbol": result = _process_singlesymbol(layer, extent, idx, output_dir) - + else: + result = _process_unsupported_renderer(layer, extent, idx, output_dir) return result @@ -306,3 +307,15 @@ def _process_singlesymbol( "has_unsupported_symbol": has_unsupported_symbol, "completed": True, } + + +def _process_unsupported_renderer( + layer: QgsVectorLayer, extent: QgsRectangle, idx: int, output_dir: str +) -> dict: + return { + "idx": idx, + "layer_name": layer.name(), + "has_unsupported_symbol": False, + "reason": "unsupported renderer", + "completed": False, + } diff --git a/ui/main_dialog.py b/ui/main_dialog.py index 11f3f4d..0df0d34 100644 --- a/ui/main_dialog.py +++ b/ui/main_dialog.py @@ -107,6 +107,14 @@ def _run(self): ) ) + # list-up layers NOT completed and its reason + layers_not_completed = list( + map( + lambda r: f"{r['layer_name']} : {r['reason']}", + list(filter(lambda r: r["completed"] is False, results)), + ) + ) + # list-up layers processed successfully: layer_0, layer_2, layer_5, ... layers_processed_successfully = list( map( @@ -147,6 +155,9 @@ def _run(self): シンプルシンボルに変換しました。\n" + "\n".join(layers_has_unsupported_symbol) ) + if len(layers_not_completed) > 0: + msg += "\n\n以下のレイヤーは出力できませんでした。\n" + msg += "\n".join(layers_not_completed) QMessageBox.information( None, "完了",