读书人

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

发布时间: 2012-09-18 16:21:42 作者: rapoo

利用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;

读书人网 >其他数据库

热点推荐