首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

利用ST_GEOMETRY兑现按辖区对点数据分类

2012-09-18 
利用ST_GEOMETRY实现按辖区对点数据分类按照空间查询所属上庄镇的gsmm数据。declare shp clob num number

利用ST_GEOMETRY实现按辖区对点数据分类

按照空间查询所属上庄镇的gsmm数据。

declare

 shp clob;
 num number;
begin 
 select sde.st_asText(t.shape) into shp from hdyljspatial.hdjd_pg t where t.jdname='上庄镇';
 
 select count(*) into num from hdyljspatial.gsmm g where sde.ST_Contains(sde.st_geomfromtext(shp,22),sde.st_geomfromtext(sde.st_asText(g.shape),22))=1;
 dbms_output.put_line(num);
end;

热点排行