<div dir="ltr">Hi,<div>How do I check if the polygon is convex in postgis?</div><div><br></div><div>Things I have tried before sending this email</div><div> I could not find any function  like st_is_convex.</div><div>I searched in google but  I could not find any user defined postgres function to check for convexity of polygon either.</div><div>select st_convexhull(wkb_geometry) = wkb_geometry  -- this returns false for convex polygons also.<br></div><div><br></div><div>Other libraries e.g. CGAL seem to have it. So I am hoping that something is already available in postgis that I am missing.</div><div><a href="https://doc.cgal.org/Manual/3.1/doc_html/cgal_manual/Partition_2_ref/Function_convex_partition_is_valid_2.html">https://doc.cgal.org/Manual/3.1/doc_html/cgal_manual/Partition_2_ref/Function_convex_partition_is_valid_2.html</a><br></div><div>Best,</div><div>HB</div></div>