I'm attempting to utilize the PostGIS function ST_MaximumInscribedCircle() but having some trouble interpreting the example. How can I feed the geometry into a from
clause to retrieve the center
and the radius
values? I've tried sub-queries and CTE's but it doesn't seem to want to recognize it. Here is an example of what I've attempted:
SELECT radius, st_geomfromtext(ST_AsText(center)) AS center, st_geomfromtext(ST_AsText(nearest)) AS nearest
FROM (select ST_MaximumInscribedCircle(st_astext(st_union(s.geom))) from table s) as foo
This is the error I'm getting:
SQL Error [42703]: ERROR: column "radius" does not exist