ArcGIS10.1使用QueryLayer空间查询为空的问题
来源:互联网 发布:java中几个Date的区别 编辑:程序博客网 时间:2024/05/22 08:58
问题描述:
我的目地是空间数据与属性数据做关联,使用ArcGIS提供的QueryLayer对象,但是发现一个问题,我可以创建相关的QueryLayer对象,但是我在使用Identify和拉框查询都查询不到结果。但是要素类在ArcMap可以进行空间查询。
而且同时有两个客户都有相同的问题,环境都是一样的,ArcGIS10.1,遇到的问题都是一样的。
问题分析:
碰到类似的问题,做空间查询,因为用户是使用了Oracle数据库,我就跟踪了后台的Trace文件。
Tips:ArcSDE性能分析——跟踪Oracle的Trace文件
PARSING IN CURSOR #24 len=183 dep=0 uid=91 oct=3 lid=91 tim=6720275108 hv=3771019214 ad='7ff2b5f0998' sqlid='68khff3hcabyf'select * from (select * from lichuan where objectid<3) a where SDE.st_intersects(SHAPE,SDE.st_geometry(:st1,:st2,:st3,:st4,:st5,:st6,:st7,:st8,:st9,:st10,:st11,:st12,:st13,:st14)) = 1END OF STMTPARSE #24:c=15625,e=6
看到这个Trace文件,发现在对QueryLayer进行空间查询使用了ST_Intersects 函数,使用空间SQL,肯定是要配置ST_Geometry的。
ArcSDE10.1配置Oracle 监听器来使用SQL操作ST_Geometry
怎么配置 Oracle 侦听器来使用SQL操作ST_Geometry
查询一下ArcGIS10.1的QueryLayer帮助
http://resources.arcgis.com/en/help/main/10.1/index.html#/Preparing_to_use_query_layers/00s500000032000000/
Oracle databasesTwo spatial types are supported in Oracle that you can use in your query layers: ST_Geometry and SDO_Geometry.The ST_Geometry spatial type is installed when you create an enterprise geodatabase in Oracle or can be installed in an Oracle database using the Create Spatial Type geoprocessing tool. You also need to configure the Oracle EXTPROC to use ST_Geometry. Your GIS administrator or DBA can tell you if your database has been configured to use this spatial type. For information on configuring the EXTPROC, see Configuring the Oracle listener to use SQL and your Oracle documentation.Oracle Locator objects, including the SDO_Geometry type, are present by default in Oracle databases. Therefore, you can access the SDO_Geometry type without additional installations. However, to access all SDO_Geometry functions, you may need to install Oracle Spatial in the DBMS.Install on your client computer the Oracle Net application. You can obtain the Oracle Instant Client from the Esri Customer Care portal or get the Instant or full client from Oracle.For information on installing and configuring the Oracle client, see Oracle's documentation set.从帮助上可以看到,使用QueryLayer需要配置空间SQL,但是ArcGIS10版本的时候,并没有这个要求。
--------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
Blog: http://blog.csdn.net/linghe301
Weibo: http://www.weibo.com/linghe301
--------------------------------------------------------------------------------------------
其实对QueryLayer对象相简单说明一下:
一开始设计QueryLayer对象,最主要的目的是让ArcGIS客户端可以连接非ArcSDE的数据,比如Oracle的Oracle Spatial、SQL Server的Geometry或者Geography存储的数据,但是因为它可以自定义SQL语句,那么好多用户就觉得QueryLayer来进行关联数据也是一个不错的选择。
关于更多QueryLayer的了解:
从上面的描述我们可以看到
1:如果是要素类加载到ArcMap进行空间查询,是不需要配置空间SQL的,它是会将数据与查询图层的矩形包络线进行查询,然后在前台再进行过滤。
2:如果要素类创建的QueryLayer在ArcMap进行空间查询,那么就是用了空间SQL函数进行查询。
--------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
Blog: http://blog.csdn.net/linghe301
Weibo: http://www.weibo.com/linghe301
--------------------------------------------------------------------------------------------
所以用户问题的核心就是使用QueryLayer没有配置空间SQL,其实用户进行关联,有多种选择,比如Join,比如ArcSDE视图等都是一个和不错的选择。
Tips:ArcSDE视图的查询方式跟桌面查询要素类的方式是一样的。
我的另外一个用户配置完毕之后还是不能空间查询,因为刚好前几天碰到的一个Bug:
[Bug]ArcSDE10.1执行ST_Geometry大数据量的大范围查询范围结果为0
删除空间索引,能够查询,重建空间索引,能够查询,所以在ArcGIS10.1使用QueryLayer进行空间查询还是有相关的问题的。
我个人的建议:
1:升级ArcGIS10.2
2:使用ArcSDE视图代替QueryLayer
Tips:sdetable -o create_view
- ArcGIS10.1使用QueryLayer空间查询为空的问题
- 在使用Mybatis 做查询时遇到查询到的对象为空的问题
- c#程序中使用"like“查询access数据库查询为空的问题
- 当使用hql进行投影查询时对于外键为空的记录查询不出来的问题
- 查询EXCEL数据时,列数据为空的问题
- Mysql查询中文结果集为空的问题
- Blob字段为空值的查询问题
- 关于MyBatis关联查询 (association)映射为空的问题
- 关于查询排序的空间使用问题
- Node使用mongoose查询一直为空的原因
- ArcGIS10.1 Desktop打开慢的问题
- ARCGIS10.1安装出现的问题
- GeoWebCache发布arcgis10.1的切片问题
- ArcGIS10地图包的使用
- SQL Server使用Merge语句当源表数据集为空时,无法进行查询的问题
- SQL Server使用Merge语句当源表数据集为空时,无法进行查询的问题
- SQL Server使用Merge语句当源表数据集为空时,无法进行查询的问题
- MySQL使用float查询为空
- .NET平台开源JSON库LitJSON的使用方法
- 美军用机器人投入实地作战 十年内数量超士兵
- GetCursorPos
- vba如何退出while循环?
- 2013-11-22 后台奖品列表和获奖名单列表开发
- ArcGIS10.1使用QueryLayer空间查询为空的问题
- centos彻底删除文件夹、文件命令(centos 新建、删除、移动、复制等命令)
- 自创小说《彩虹雨》 连载(四)
- IBM开放超级计算机Watson API 开发者可编写应用
- centos 杀死进程命令
- Google的创新九原则
- 每天一个linux命令:less
- listview中分列展示数据
- 实现Android手机中隐藏App图标