geometry 矢量数据操作

 

插入点  

eg: POINT(114.143 30.7088)

geomfromtext('POINT("shape参数")')    shape=geometry类型数据

eg:插入

 insert into plot_riskassessment (id,uid,`name`,geomfromtext('POINT("+plotRiskAssessment.getShape()+")'))

eg:修改 geomfromtext('POINT("shape参数")')

update plot_riskassessment set uid=:uid,name=:name,shape=geomfromtext('POINT("+plotRiskAssessment.getShape()+")') 

eg:查询 asText(Centroid(t1.shape)) as shape

SELECT t1.id, t1.uid,t1.`name`,asText(Centroid(t1.shape)) as shape FROM plot_baseinfo AS t1 where t1.uid=:uid 

eg:shape 经度纬度转换

SELECT t1.id,t1.uid,asText(Centroid(t1.shape)) as shape,X(Centroid(t1.shape)) as lon,Y(Centroid(t1.shape)) as lat,t1.position FROM plot_detailedsurvey AS t1 

eg:插入面数据  

eg:POLYGON((114.04 30.465, 114.039 30.465, 114.038 30.4677, 114.039 30.4677, 114.04 30.465))

insert into plot_detailedsurvey (id,uid,name,geomfromtext('POLYGON(("+plotDetailedSurvey.getShape()+"))  '))

eg:插入矢量数据不确定点面类型

 insert into plot_riskassessment (id,uid,`name`,geomfromtext('"+plotRiskAssessment.getShape()+"'))
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南归北隐

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值