##Oracle to postgresql copy basedb.sxfmr from oracle to postgresql ~~~ //於postgresql 建立這個view CREATE OR REPLACE VIEW public."fsc-115-c-0-tcount" AS SELECT "fsc-115-c-0".gid, "fsc-115-c-0".did, "fsc-115-c-0".tid, "fsc-115-c-0".oid, "fsc-115-c-0".cid, "fsc-115-c-0".lid, "fsc-115-c-0".level, "fsc-115-c-0".symcolor, "fsc-115-c-0".symweight, "fsc-115-c-0".symstyle, "fsc-115-c-0".just, "fsc-115-c-0".height, "fsc-115-c-0".width, "fsc-115-c-0".angle, sxfmr.tcount AS context, "fsc-115-c-0".origin AS geom FROM gisrepo1."fsc-115-c-0" JOIN sxfmr ON "fsc-115-c-0".oid = sxfmr.ufid; ~~~ ##Geoserver ###Style #####buf115-5m ~~~ sxfmrbuff5 buffr_cycle Feature generic:geometry simple Bule Rule context 20 geom 5 #0000A0 0.2 context Apple LiGothic 14.0 normal normal 0.0 0.0 0.0 0.0 1 #FFFFFF #000000 Yellow Rule context 6 20 geom 5 #A0A000 0.3 context Apple LiGothic 14.0 normal normal 0.0 0.0 0.0 0.0 1 #FFFFFF #000000 RED Rule context 5 geom 5 #A00000 0.2 context Apple LiGothic 14.0 normal normal 0.0 0.0 0.0 0.0 1 #FFFFFF #000000 ~~~ #####buf115-25m ~~~ sxfmrbuff25 buffr_cycle Feature generic:geometry simple Bule Rule context 20 geom 25 #0000FF 0.2 context Apple LiGothic 14.0 normal normal 0.0 0.0 0.0 0.0 1 #FFFFFF #000000 GREEN Rule context 6 20 geom 25 #00FF00 0.3 context Apple LiGothic 14.0 normal normal 0.0 0.0 0.0 0.0 1 #FFFFFF #000000 RED Rule context 5 geom 25 #FF0000 0.2 context Apple LiGothic 14.0 normal normal 0.0 0.0 0.0 0.0 1 #FFFFFF #000000 ~~~ #####symbol115 ~~~ Default Styler Group0 Feature generic:geometry simple Default Rule Symbol 20 68000 origin triangle #D95F02 0.1 #D95F02 0.25 12 ~~~ ###Layer 以public."fsc-115-c-0-tcount"建立兩個圖層 ~~~ xtpc:fsc-115-c-0-tcount5m style=buf115-5m xtpc:fsc-115-c-0-tcount25m style=buf115-25m ~~~ 以public."fsc-115-c-0-tcount"建立一個圖層 ~~~ xtpc:fsc-115-c0-tcount-symbol style=symbol115 ~~~ ##建立兩個圖層群組 ~~~ pgTcount (xtpc:fsc-115-c-0-tcount5m+xtpc:fsc-115-c0-tcount-symbol) pgTcount25m (xtpc:fsc-115-c-0-tcount25m+xtpc:fsc-115-c0-tcount-symbol) ~~~ #程式相關設定 請設定tpcSetting.js ~~~ wmsUrl="http://www.ximple.com.tw:80/geosns/xtpc/wms"; var layerList=[ {name:"通用版電子地圖",id:"basemap8",featureinfo:false,showdef:true,layerinfo:{baselayer:false,layerType:"wmts",content:"http://maps.nlsc.gov.tw/S_Maps/wmts", layerid:"EMAP",projection:"EPSG:3857"}}, {name:"變壓器範圍圖5m",id:"變壓器範圍圖5m",featureinfo:false,showdef:true,layerinfo:{baselayer:false,layerType:"wms", layerid:"xtpc:pgTcount",projection:"EPSG:3826"}}, {name:"變壓器範圍圖25m",id:"變壓器範圍圖25m",featureinfo:false,showdef:false,layerinfo:{baselayer:false,layerType:"wms", layerid:"xtpc:pgTcount25m",projection:"EPSG:3826"}} ]; ~~~