<html><head></head><body><div class="ydpb6ad9e7ayahoo-style-wrap" style="font-family:verdana, helvetica, sans-serif;font-size:16px;"><div></div>
        <div dir="ltr" data-setdir="false">Hi,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I'm not aware of such a function, but a simple workaround may be to create a convex hull from the polygon perimeter, then see if this is the same as the original polygon. Any concavities present in the original should ensure a difference.<br></div><div><br></div><div><br></div><div dir="ltr" data-setdir="false">Cheers,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Brent<br></div><div><br></div>
        
        </div><div id="ydp195f7d6cyahoo_quoted_6384532789" class="ydp195f7d6cyahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Thursday, March 3, 2022, 10:16:14 AM GMT+13, B H <hemantbist@gmail.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp195f7d6cyiv6427611598"><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" rel="nofollow" target="_blank">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>
</div>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" rel="nofollow" target="_blank">postgis-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="nofollow" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br></div>
            </div>
        </div></body></html>