-->

科技资讯

您的当前位置:首页 > 资讯 > postgresql

postgresql外扩数据生成电子围栏

2019-01-04 15:14:30  来源:admin 点击:999

  • ST_Buffer:用于矢量对象生成缓冲区geometry对象,可用于缓冲区对象的显示,使用举例(其中bufferColumn字段是geometry类型):updatetableNamesetbufferColumn=ST_Buffer(ST_GeomFromText('LINESTRING(5050,150150,15050)'),10,'endcap=roundjoin=round');这是其中一种类型的缓冲区用法,其他用法参考:http://postgis.net/do

  • ST_Buffer:用于矢量对象生成缓冲区geometry对象,可用于缓冲区对象的显示,使用举例(其中bufferColumn字段是geometry类型):

    update tableName set bufferColumn=ST_Buffer( ST_GeomFromText( 'LINESTRING(50 50,150 150,150 50)'), 10, 'endcap=round join=round');

    这是其中一种类型的缓冲区用法,其他用法参考:http://postgis.net/docs/ST_Buffer.html

    ST_DWithin:检测一个对象是否在另一个对象的缓冲区范围内,不生成缓冲区对象,效率更高,速度更快。使用举例:

    查询tableName表中存在于objectid=100的对象10米缓冲区内的所有对象,其中geom为geometry字段:

    select * from tableName where ST_DWithin(geom, (select geom from tableNamewhere objectid=100), 10)=true

    其他用法参考:http://postgis.net/docs/ST_DWithin.html


相关文章更多 >

© 2024版权所有 水水网

电话:171780793