Not make sense, the 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" [EXTENSION] 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 (Internal)

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

  • \df st_area, and all other are there...

  • \df public.ST_ApproximateMedialAxis = no function!

This last check shows that was not installed (!)... Well, the guide say "This method needs SFCGAL backend", how to check it?

4

1 Answer

Seems so simple

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 

Thanks to @JGH and

Now postgis_full_version() shows also SFCGAL version, SFCGAL="1.3.7".

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.