更新时间:2022-04-24 GMT+08:00
分享

地理处理函数

st_antimeridianSafeGeom

Geometry st_antimeridianSafeGeom(Geometry geom)

如果geom跨越antimeridian,会尝试将geom转换为“antimeridian-safe”的等价形式(即输出的Geometry会被BOX(-180 -90,180 90)覆盖)。 在某些情况下,此方法可能会失败,在这种情况下将返回输入的geom,并将记录错误。

示例:

  • 查询命令:

    select st_astext(st_antimeridianSafeGeom(st_geomFromWKT(location))) from geotbl where id='5'

  • 查询结果:
    LINESTRING (30 10, 40 40, 20 40, 10 20, 30 10)

st_idlSafeGeom

st_antimeridianSafeGeom的别名。

示例:

  • 查询命令:

    select st_astext(st_idlSafeGeom(st_geomFromWKT(location))) from geotbl where id='6'

  • 查询结果:
    POINT (11 22)

st_bufferPoint

Geometry st_bufferPoint(Point p, Double buffer)

返回覆盖Point p给定半径内所有点的Geometry,其中半径以米为单位。

示例:

  • 查询命令:

    select st_astext(st_bufferPoint(st_castToPoint(st_geomFromWKT(location)),0.1)) from geotbl where id='6'

  • 查询结果:
    10.999999429878716 22.000000784704625, 10.999999381731708 22.00000074735798, 10.999999336024723 22.00000070706185, 10.999999292938147 22.000000663975275, 10.99999925264202 22.00000061826829, 10.999999215295372 22.000000570121284, 10.999999181045595 22.000000519724267, 10.99999915002786 22.000000467276138, 10.999999122364573 22.000000412983884, 10.999999098164913 22.00000035706177, 10.999999077524384 22.000000299730495, 10.999999060524447 22.000000241216323, 10.999999047232189 22.00000018175018, 10.99999903770007 22.000000121566753, 10.999999031965709 22.000000060903556, 10.999999030051738 22, 10.999999031965709 21.999999939096444, 10.99999903770007 21.999999878433247, 10.999999047232189 21.99999981824982, 10.999999060524447 21.999999758783677, 10.999999077524384 21.999999700269505, 10.999999098164913 21.99999964293823, 10.999999122364573 21.999999587016116, 10.99999915002786 21.999999532723862, 10.999999181045595 21.999999480275733, 10.999999215295372 21.999999429878716, 10.99999925264202 21.99999938173171, 10.999999292938147 21.999999336024725, 10.999999336024723 21.99999929293815, 10.999999381731708 21.99999925264202, 10.999999429878716 21.999999215295375, 10.999999480275731 21.9999991810456, 10.99999953272386 21.99999915002786, 10.999999587016116 21.999999122364574, 10.99999964293823 21.999999098164913, 10.999999700269504 21.999999077524386, 10.999999758783677 21.99999906052445, 10.999999818249819 21.99999904723219, 10.999999878433249 21.99999903770007, 10.999999939096444 21.99999903196571, 11 21.99999903005174, 11.000000060903556 21.99999903196571, 11.000000121566751 21.99999903770007, 11.000000181750181 21.99999904723219, 11.000000241216323 21.99999906052445, 11.000000299730496 21.999999077524386, 11.00000035706177 21.999999098164913, 11.000000412983884 21.999999122364574, 11.00000046727614 21.99999915002786, 11.000000519724269 21.9999991810456, 11.000000570121284 21.999999215295375, 11.000000618268292 21.99999925264202, 11.000000663975277 21.99999929293815, 11.000000707061853 21.999999336024725, 11.00000074735798 21.99999938173171, 11.000000784704628 21.999999429878716, 11.000000818954405 21.999999480275733, 11.00000084997214 21.999999532723862, 11.000000877635427 21.999999587016116, 11.000000901835087 21.99999964293823, 11.000000922475616 21.999999700269505, 11.000000939475553 21.999999758783677, 11.000000952767811 21.99999981824982, 11.00000096229993 21.999999878433247, 11.000000968034291 21.999999939096444, 11.000000969948262 22))

st_convexHull

Geometry st_convexHull(Geometry geom)

聚合函数。 几何体的凸包表示包含聚合行中所有几何图形的最小凸面几何体。

分享:

    相关文档

    相关产品

close