确保查询的点都在行政区内
This commit is contained in:
@@ -37,8 +37,10 @@
|
||||
disaster_type IN('滑坡', '泥石流')
|
||||
</otherwise>
|
||||
</choose>
|
||||
AND is_delete = 0
|
||||
<!-- 确定落在西安境内 -->
|
||||
AND ST_Within(geom, (SELECT geom FROM xian_district WHERE id = 1))
|
||||
</where>
|
||||
AND is_delete = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据id获取隐患点详情 -->
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
SELECT id, lon, lat FROM xian_hospitals
|
||||
<where>
|
||||
is_delete = 0
|
||||
<!-- 确定落在西安境内 -->
|
||||
AND ST_Within(point, (SELECT geom FROM xian_district WHERE id = 1))
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
SELECT id, lon, lat FROM xian_risk_spots
|
||||
<where>
|
||||
is_delete = 0
|
||||
<!-- 确定落在西安境内 -->
|
||||
AND ST_Within(geom, (SELECT geom FROM xian_district WHERE id = 1))
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user