Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以在 EXPRESSION MAPFILE 中添加 SQL QUERY 吗?像这样 ..
CLASS Name '> 0' EXPRESSION (SELECT * from tb_kelurahan where id_kecamatan='[id_kecamatan]' > 0) COLOR 20 215 0 OUTLINECOLOR 0 0 0
结束#类
不,但作为替代方案,您可以将 sql 作为附加列添加到 DATA 语句,然后在表达式中引用它。
DATA "the_geom from (select case when id_kecamatan>0 then 1 else 0 end as myexpress, the_geom, ...) as foo ...."
然后使用:
表达式 ([myexpress] = 1)