【问题标题】:ST_ApproximateMedialAxis(geometry) does not exist?ST_ApproximateMedialAxis(geometry) 不存在?
【发布时间】:2020-07-10 20:27:31
【问题描述】:

没有意义,function exists since v2.2

SELECT distinct geometrytype(geom) from t; --  POLYGON
SELECT ST_ApproximateMedialAxis(geom) from t;
-- ERROR:  function st_approximatemedialaxis(geometry) does not exist
-- LINE 1: select ST_ApproximateMedialAxis(geom) from t...

  • select PostGIS_Version() = "3.0 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"

  • select select postgis_full_version() = POSTGIS="3.0.1 ec2a9aa" [扩展] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 " PROJ="6.3.1" LIBXML="2.9 .10" LIBJSON="0.13.1" LIBPROTOBUF="1.3.3" WAGYU="0.4.3(内部)

  • select Version() = "PostgreSQL 12.3 (Ubuntu 12.3-1.pgdg20.04+1) ... 64 位"

  • \df st_area,其他的都在那里……

  • \df public.ST_ApproximateMedialAxis = 没有功能!

最后一次检查显示没有安装(!)...好吧,指南说“此方法需要 SFCGAL 后端”,如何检查?

【问题讨论】:

  • 它应该在那里..也许是路径问题?试试\df public.ST_ApproximateMedialAxis
  • 谢谢@JGH,我编辑了。
  • 你可以使用select postgis_full_version();检查我的确实包含SFCGAL="1.3.2"
  • 感谢@JGH,现在我们找到了问题的原因(!)。下一步,“如何安装 SFCGAL?”

标签: postgis


【解决方案1】:

看起来很简单

CREATE EXTENSION postgis_sfcgal;
\df public.ST_ApproximateMedialAxis

                                 List of functions
 Schema |           Name           | Result data type | Argument data types | Type
--------+--------------------------+------------------+---------------------+------
 public | st_approximatemedialaxis | geometry         | geometry            | func

感谢@JGH 和https://gis.stackexchange.com/a/179618/7505

现在postgis_full_version() 还显示 SFCGAL 版本,SFCGAL="1.3.7"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多