From 4f777e997c8fc130e83c7643b4f92f906329338e Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 10 三月 2023 13:51:42 +0800 Subject: [PATCH] 1 --- ExportMap/Sources/xyz.py | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ExportMap/Sources/xyz.py b/ExportMap/Sources/xyz.py index 0a33cdf..c1d6e34 100644 --- a/ExportMap/Sources/xyz.py +++ b/ExportMap/Sources/xyz.py @@ -27,8 +27,8 @@ parser = argparse.ArgumentParser(description='ArgUtils') parser.add_argument("-src", type=str, default=get_full_path(), required=False) parser.add_argument("-qgz", type=str, default="xyz.qgz", required=False) - parser.add_argument("-file", type=str, default=r"D:\xyz\tiles.txt", required=False) - parser.add_argument("-out", type=str, default=r"D:\xyz\tiles\zy", required=False) + parser.add_argument("-file", type=str, default=r"D:\xyz\dq.txt", required=False) + parser.add_argument("-out", type=str, default=r"D:\xyz\tiles\dq", required=False) return parser.parse_args() @@ -63,6 +63,7 @@ if len(prj.mapLayers()) == 0: prj.setCrs(layer.crs()) + for j in range(1, layer.bandCount() + 1): layer.dataProvider().setNoDataValue(j, 0) @@ -127,9 +128,10 @@ 'TILE_WIDTH': 256, 'TMS_CONVENTION': True, 'ZOOM_MAX': 18, - 'ZOOM_MIN': 12 + 'ZOOM_MIN': 4 } - processing.run("qgis:tilesxyzdirectory", ops) + print(ops) + #processing.run("qgis:tilesxyzdirectory", ops) qgs.exitQgis() -- Gitblit v1.9.3