ORACLE SDO_GEOMETRY ToString()? [英] ORACLE SDO_GEOMETRY ToString()?

查看:267
本文介绍了ORACLE SDO_GEOMETRY ToString()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在编写的.Net系统,它需要能够从数据库中检索oracle几何字段.我的SQL语句中是否有任何方法可以将几何类型转换为字符串,以便我可以在.Net方面进行处理.目前我无法取出数据,因为它不是放入OLEDB阅读器的有效数据类型,因此必须将其转换为数据库端.

I have a .Net system that I am writing which needs to be able to retrieve an oracle geometry field from the database. Is there any way in my SQL statement to cast the geometry type to a string so that I can deal with it on my .Net side. At the moment I cannot get the data out as it is not a valid datatype to put into my OLEDB reader so it must be converted database side.

select CS_BOUNDS from MDSYS.CS_SRS where SRID = 4326

谢谢

推荐答案

您可以使用

You could use the Get_WKT method:

返回众所周知的文本(WKT)格式(在第6.7.1.1节).

Returns the well-known text (WKT) format (explained in Section 6.7.1.1) of a geometry object.

文档提供以下示例:

SELECT c.shape.Get_WKT()
  FROM cola_markets c WHERE c.name = 'cola_b';

C.SHAPE.GET_WKT()                                                               
--------------------------------------------------------------------------------
POLYGON ((5.0 1.0, 8.0 1.0, 8.0 6.0, 5.0 7.0, 5.0 1.0)) 

返回类型为CLOB.

这篇关于ORACLE SDO_GEOMETRY ToString()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆