0
点赞
收藏
分享

微信扫一扫

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()+"'))

举报

相关推荐

0 条评论