摘要: 使用lucene做拉框查询 最简单不过了 直接看代码:private List<Document> spatialQuery0(String keyword,double minx,double miny,double maxx,double maxy){ List<Document> lst=new ArrayList<Document>(); try{ File f=new File(heath_index_path); if(!f.exists()){ f.mkdirs(); } Directory d=FSDirectory.open(f); Ana 阅读全文
posted @ 2012-10-18 22:05 李克华 阅读(520) 评论(0) 推荐(0)
摘要: oracle spatial有个函数 将geometry转换为gml.函数名称为SDO_UTIL.TO_GMLGEOMETRY(geo)。这个geo就是SDO.Geometry类型 可是这个函数的返回值是Clob类型的Geometry。当然我们可以使用TO_CHAR函数 将其转为字符串类型。下面是一个测试的sql:select t.objectid,TO_CHAR(sdo_util.TO_GMLGEOMETRY(t.shape)) AS GML,t.comp_type,t.datatype,t.comp_name,t.health_lic,t.shape.SDO_POINT.X as x,t. 阅读全文
posted @ 2012-10-18 21:49 李克华 阅读(3646) 评论(0) 推荐(0)
摘要: 在没有使用使用arcgis server adf之前 我觉得使用ajax是一件so easy的事儿 可是使用adf以前 我感觉相当的郁闷。ok 废话少说,直接进入正题。场景:我要从后台获得当前视野范围内地图的范围,并通过xml返回给用户。步骤:1、写一个类MapExtentListener,让它实现PhaseListener接口。代码如下所示:package com.esri.adf.web.templates;import java.io.IOException;import java.util.Map;import javax.faces.context.FacesContext;imp. 阅读全文
posted @ 2012-10-18 21:06 李克华 阅读(683) 评论(0) 推荐(0)
摘要: 查询距某一点某一距离的所有要素(即我们通常说的周边查询)sql:select t.objectid,t.comp_type,t.datatype,t.comp_name,t.health_lic,t.shape.SDO_POINT.X as x,t.shape.SDO_POINT.Y as y,t.reg_addr,t.bus_addr from t_publicplaces t where 1=1 and substr(t.comp_type,0,2)='01' and sdo_within_distance(t.SHAPE,SDO_GEOMETRY(2001,8307,SD 阅读全文
posted @ 2012-10-18 20:43 李克华 阅读(1488) 评论(0) 推荐(0)