zfxcms ^回到顶部

您的当前位置:首页 > 最新IT资讯 > postgresql > postgresql外扩数据生成电子围栏

postgresql外扩数据生成电子围栏

所属分类: postgresql   2019-01-04 15:14:30  编辑:admin  浏览次数 1002 次

  • 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


随笔文章检索

随笔文章目录