feat: 市场出图增加楼宇查询结果导入项
This commit is contained in:
+8
-1
@@ -18,6 +18,13 @@ def render():
|
|||||||
for index, (key, (label, default, extension)) in enumerate(SOURCES.items()):
|
for index, (key, (label, default, extension)) in enumerate(SOURCES.items()):
|
||||||
with columns[index % 2]:
|
with columns[index % 2]:
|
||||||
params[key] = file_input(label, default, extension, key)
|
params[key] = file_input(label, default, extension, key)
|
||||||
|
with columns[len(SOURCES) % 2]:
|
||||||
|
params["NR_BUILDINGS_DATA_CSV"] = file_input(
|
||||||
|
"楼宇查询结果",
|
||||||
|
"source/NRBuildingsData.csv",
|
||||||
|
"csv",
|
||||||
|
"nr_buildings_csv",
|
||||||
|
)
|
||||||
options = []
|
options = []
|
||||||
if params["MARKET_GPKG"]:
|
if params["MARKET_GPKG"]:
|
||||||
try:
|
try:
|
||||||
@@ -57,7 +64,7 @@ def render():
|
|||||||
if submitted:
|
if submitted:
|
||||||
params["SELECTED_MARKET_IDS"] = [fid for fid, _ in options] if all_markets else chosen
|
params["SELECTED_MARKET_IDS"] = [fid for fid, _ in options] if all_markets else chosen
|
||||||
try:
|
try:
|
||||||
data_csv = Path("source/NRBuildingsData.csv")
|
data_csv = Path(params["NR_BUILDINGS_DATA_CSV"] or "")
|
||||||
polygon_csv = Path("source/NRBuildPolygon.csv")
|
polygon_csv = Path("source/NRBuildPolygon.csv")
|
||||||
data_gpkg = Path("source/NRBuildingsData.gpkg")
|
data_gpkg = Path("source/NRBuildingsData.gpkg")
|
||||||
if not data_csv.is_file() or not polygon_csv.is_file():
|
if not data_csv.is_file() or not polygon_csv.is_file():
|
||||||
|
|||||||
Reference in New Issue
Block a user