码迷,mamicode.com
首页 > 其他好文 > 详细

sde空间库的相关函数

时间:2018-09-01 22:06:07      阅读:595      评论:0      收藏:0      [点我收藏+]

标签:gif   ble   sha   1.2   com   unit   pre   div   create   

1.在sde库中创建表:community

技术分享图片
1 表:community
2 字段:id(INTEGER),
3   shape(ST_GEOMETRY)
4 
5 脚本如下:
6 create table community(
7     id INTEGER (20) primary key,
8     shape ST_GEOMETRY
9 );
community

2.往sde库中添加资源类型:

  1.1点资源:

技术分享图片
1 //方式一
2 insert into community (id,shape) values(1,sde.st_point(108.88435274362564,34.18598626412913,2) );
3 //方式二
4 insert into community(id,shape) values(2, sde.st_geometry(‘point(108.88905733823776 34.19655139297006)‘,2));
点资源新增

  1.2线资源:

技术分享图片
1 insert into community(id,shape) values(2, sde.st_stringline(‘stringline(108.88 34.19,108.98 34.29)‘,2));
线资源新增

(注意:线资源新增时候,在st_stringline()函数中,点的数量大于2,并且两个点不为同一个点,坐标系的值为srid)

  1.3面资源:

技术分享图片
1 insert into community(id,shape) values(2, sde.st_geometry(‘plygon(108.88 34.19,108.98 34.29,108.88 34.19)‘,2));
面资源的新增

(注意:面资源新增时候,在st_plygon()函数中,点的数量大于3,并且起点和终点为同一个点,首位相接,不能交叉,坐标系的值为srid)

sde空间库的相关函数

标签:gif   ble   sha   1.2   com   unit   pre   div   create   

原文地址:https://www.cnblogs.com/talenter/p/9571405.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!