3

I'm trying to calculate center line from polygon, so i'm trying to do with postgis function st_straightskeleton but it is rising the error of function not found.

postgis version: POSTGIS="2.4.3 r16312" PGSQL="100" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" (core procs from "2.4.2 r16113" need upgrade) RASTER (raster procs from "2.4.2 r16113" need upgrade)

i have tried this example but getting error

SELECT ST_StraightSkeleton(ST_GeomFromText('POLYGON (( 190 190, 10 190, 10 10, 190 10, 190 20, 160 30, 60 30, 60 130, 190 140, 190 190 ))'));

Error

ERROR:  function st_straightskeleton(geometry) does not exist
LINE 1: SELECT ST_StraightSkeleton(ST_GeomFromText('POLYGON (( 190 1...
2

1 Answer 1

2

You need the extension postgis_sfcgal

ex)

CREATE EXTENSION postgis_sfcgal;

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.