mapfile中使用子查询实现道路分级

mapfile中使用子查询实现道路分级

查看道路分级如下:

mapdb=# select distinct pathclass from rbeijing;
 pathclass
-----------
 0
 15
 2
 3
 4
(5 rows)

使用子查询实现道路分级

  CONNECTIONTYPE postgis
  PROCESSING "CLOST_CONNECTION=DEFER"
  CONNECTION "user=map password=postgres dbname=mapdb host=192.168.1.11 port=5432"
  DATA "the_geom from  (select * from rbeijing where pathclass='3') as subquery using unique gid USING SRID=4326"









分级前的查询代码
  CONNECTIONTYPE postgis
  PROCESSING "CLOST_CONNECTION=DEFER"
  CONNECTION "user=zhangyi password=postgres dbname=zydb host=192.168.10.166 port=5432"
  DATA "the_geom from rbeijing using unique gid USING SRID=4326"                                                  
  #DATA "the_geom from  (select * from rbeijing where pathclass='3') as subquery using unique gid USING SRID=4326"

分级前的效果







|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|

你可能感兴趣的:(mapfile中使用子查询实现道路分级)