5 Temmuz 2022 Salı

PostGIS ST_MaximumInscribedCircle

Giriş
Açıklaması şöyle. 3 çıktısı olan bir sonuç döner. Bunlar radius, center ve center'a en yakın nokta
Finds the largest circle that is fully contained within a geometry. Returns a record with the center point of the circle, a point on the geometry that is nearest to the center, and the radius of the circle.
Örnek
Şöyle yaparız
SELECT
  mic.radius,
  mic.center,   --already a GEOMETRY(POINT) type
  mic.nearest   --already a GEOMETRY(POINT) type
FROM
  <table> AS t,
  LATERAL ST_MaximumInscribedCircle(t.geom) AS mic
;