Skip to content

Commit

Permalink
Merge pull request #69 from MIERUNE/feature/dm-optional
Browse files Browse the repository at this point in the history
DM (公共測量標準図式) の読み込みを一旦無効化する
  • Loading branch information
ciscorn committed Sep 5, 2023
2 parents d20efe5 + 5fbdd23 commit 85d91fe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plateau_plugin/algorithms/load_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def processAlgorithm( # noqa: C901
QgsProcessingContext.LayerDetails(
layer.name(),
context.project(),
self.name(),
layer.name(),
QgsProcessingUtils.LayerHint.Vector, # type: ignore
),
)
Expand Down
2 changes: 1 addition & 1 deletion plateau_plugin/plateau/codelists/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class CodelistStore:
"""事前定義されたコードリストまたは頒布データの ./codelists./ ディレクトリからコードを検索する"""
"""事前定義されたコードリストまたは頒布データの ./codelists/ ディレクトリからコードを検索する"""

def __init__(self, base_path: Path) -> None:
self._base_path = base_path
Expand Down
5 changes: 4 additions & 1 deletion plateau_plugin/plateau/parse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class ParserSettings:
load_apperance: bool = False
"""Apperance (マテリアル、テクスチャ) を読み込むかどうか"""

load_dm: bool = False
"""公共測量標準図式 (DM) を読み込むかどうか"""


class CityObjectParser:
def __init__(
Expand Down Expand Up @@ -237,7 +240,7 @@ def process_cityobj_element( # noqa: C901
yield child_obj

# 公共測量標準図式 (DM)
if processor.dm_attr_container_path:
if self._settings.load_dm and processor.dm_attr_container_path:
for dm in elem.iterfind(processor.dm_attr_container_path + "/*", nsmap):
for child_obj in self.process_cityobj_element(dm, nogeom_obj):
yield child_obj
Expand Down

0 comments on commit 85d91fe

Please sign in to comment.