feat: 楼宇查询改为按轮廓 WKT 计算内部点查询
This commit is contained in:
+4
-3
@@ -6,13 +6,14 @@ from .task_panel import show_started, task_panel
|
||||
|
||||
def render():
|
||||
st.markdown("## 楼宇数据查询")
|
||||
source = file_input("坐标清单", "source/NRBuildingsPoint.csv", "csv", "building_csv")
|
||||
st.caption("按楼宇轮廓(WKT)查询:先计算落在轮廓内部的点,再按该点查询。")
|
||||
source = file_input("楼宇轮廓清单", "source/NRBuildPolygon.csv", "csv", "building_csv")
|
||||
with st.form("building_run"):
|
||||
c1, c2, c3 = st.columns(3)
|
||||
start = c1.number_input("起始行", 1, value=1)
|
||||
limit = c2.number_input("查询数量(0 表示全部)", 0, value=1000)
|
||||
concurrency = c3.number_input("并发数", 1, 32, 8)
|
||||
encoding = st.selectbox("文件编码", ["gb18030", "utf-8-sig"])
|
||||
encoding = st.selectbox("文件编码", ["utf-8-sig", "gb18030"])
|
||||
st.markdown("**连接信息**(留空则使用脚本内默认配置)")
|
||||
url = st.text_input("服务地址", type="password", placeholder="https://...wfs?...ak=...&sig=...")
|
||||
cookies = st.text_input("登录信息", type="password", placeholder="CASTGC=...")
|
||||
@@ -25,7 +26,7 @@ def render():
|
||||
if submitted:
|
||||
try:
|
||||
if not source:
|
||||
raise ValueError("请先导入坐标文件。")
|
||||
raise ValueError("请先导入楼宇轮廓文件。")
|
||||
override = bool(url.strip() or cookies.strip())
|
||||
if override and (not url.strip().startswith(("http://", "https://")) or not cookies.strip()):
|
||||
raise ValueError("服务地址和登录信息需同时填写,且地址以 http(s):// 开头。")
|
||||
|
||||
Reference in New Issue
Block a user