怎么将sdo_geometry插入数据库中
展开全部
你好,用如下代码
DESCRIBE SDO_GEOMETRY;
user type definition
TYPE SDO_GEOMETRY AS OBJECT (
SDO_GTYPE NUMBER,
SDO_SRID NUMBER,
SDO_POINT SDO_POINT_TYPE,
SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY,
SDO_ORDINATES SDO_ORDINATE_ARRAY,
MEMBER FUNCTION GET_GTYPE RETURN NUMBER DETERMINISTIC,
MEMBER FUNCTION GET_DIMS RETURN NUMBER DETERMINISTIC,
MEMBER FUNCTION GET_LRS_DIM RETURN NUMBER DETERMINISTIC)
ALTER TYPE SDO_GEOMETRY ADD MEMBER FUNCTION GET_WKB RETURN BLOB DETERMINISTIC,
ADD MEMBER FUNCTION GET_WKT RETURN CLOB DETERMINISTIC,
ADD MEMBER FUNCTION ST_CoordDim RETURN SMALLINT DETERMINISTIC,
ADD MEMBER FUNCTION ST_IsValid RETURN INTEGER DETERMINISTIC,
ADD CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkt IN CLOB,
srid IN INTEGER DEFAULT NULL) RETURN SELF AS RESULT,
ADD CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkt IN VARCHAR2,
srid IN INTEGER DEFAULT NULL) RETURN SELF AS RESULT,
ADD CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkb IN BLOB,
srid IN INTEGER DEFAULT NULL) RETURN SELF AS RESULT
CASCADE
DESCRIBE SDO_GEOMETRY;
user type definition
TYPE SDO_GEOMETRY AS OBJECT (
SDO_GTYPE NUMBER,
SDO_SRID NUMBER,
SDO_POINT SDO_POINT_TYPE,
SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY,
SDO_ORDINATES SDO_ORDINATE_ARRAY,
MEMBER FUNCTION GET_GTYPE RETURN NUMBER DETERMINISTIC,
MEMBER FUNCTION GET_DIMS RETURN NUMBER DETERMINISTIC,
MEMBER FUNCTION GET_LRS_DIM RETURN NUMBER DETERMINISTIC)
ALTER TYPE SDO_GEOMETRY ADD MEMBER FUNCTION GET_WKB RETURN BLOB DETERMINISTIC,
ADD MEMBER FUNCTION GET_WKT RETURN CLOB DETERMINISTIC,
ADD MEMBER FUNCTION ST_CoordDim RETURN SMALLINT DETERMINISTIC,
ADD MEMBER FUNCTION ST_IsValid RETURN INTEGER DETERMINISTIC,
ADD CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkt IN CLOB,
srid IN INTEGER DEFAULT NULL) RETURN SELF AS RESULT,
ADD CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkt IN VARCHAR2,
srid IN INTEGER DEFAULT NULL) RETURN SELF AS RESULT,
ADD CONSTRUCTOR FUNCTION SDO_GEOMETRY(wkb IN BLOB,
srid IN INTEGER DEFAULT NULL) RETURN SELF AS RESULT
CASCADE
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
insert into table_xxx(col_x1)
values(
mdsys.sdo_geometry(
2002,--线
4326,
null,
mdsys.sdo_elem_info_array(1, 2, 1),
mdsys.sdo_ordinate_array(数据集合)--1,2,3,4,5,6 三个点(1,2),(3,4),(5,6)
)
);
insert into table_xxx(col_x2)
values(
mdsys.sdo_geometry(2001,--点
4326,
mdsys.sdo_point_type(x坐标, y坐标, z坐标),
null,
null)
);
详细看这个链接网页链接
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
insert into 表名 values(col1,col2...)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询