The closest points in your polygon to the respective corners of it's ST_Envelope() are your polygons corresponding corners.
-Eric -----Original Message----- From: [email protected] [mailto:[email protected]]on Behalf Of Armin Burger Sent: Thursday, February 26, 2009 2:57 PM To: PostGIS Users Discussion Subject: [postgis-users] order of points in ST_ConvexHull Hello I need to find a possibility to identify upper-left, upper-right, etc. corners of +/- rectangular polygons. I.e. polygons with guranteed just 4 corners, but with a shape that is typically between a rectangle and a rhomb. The polygons define the geometry of image boundaries ("image footprints"). But it cannot be guaranteed which point in the polygon corresponds to which corner since the order of points during geometry creation is unknown. One idea was to use ST_ConvexHull(geometry) since for this very simple polygons the convex hull seems to be identical with the geometry. It looked to me that the order in this convex hull was: lower-right, lower-left, upper-left, upper-right Does anybody know if this order is always like that or can this order change? Would anybody know another method to identify which point of the polygon corresponds to which corner? Regards Armin _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
