## Given 2 coordinates of a bounding box, bottom left..

 Author Message dburtenshaw Grasshopper Group: General Forum Members Points: 14 Visits: 203 I have a strange one for you please..Given 2 coordinates of a bounding box from a geography polygon, bottom left and top right, how can I find all 4 coordinates of the whole bounding box?I know this is a strange one, but I currently have a system where only the bottom left coordinate and top right one are recorded in the db, I need to work backwards from these two points to ascertain the original 4 points of the bounding box.I've run many Google searches but have come up blank, can am aware of the ST_Envelope command, which will give me the bounding box of a geography type, but given just two coordinates of a box, how can I get the other two (bottom right and top left).Hope this is clear.. any help would be much appreciated. thanks!Duncan. batgirl Hall of Fame Group: General Forum Members Points: 3233 Visits: 1820 dburtenshaw (10/14/2013)I have a strange one for you please..Given 2 coordinates of a bounding box from a geography polygon, bottom left and top right, how can I find all 4 coordinates of the whole bounding box?I know this is a strange one, but I currently have a system where only the bottom left coordinate and top right one are recorded in the db, I need to work backwards from these two points to ascertain the original 4 points of the bounding box.I've run many Google searches but have come up blank, can am aware of the ST_Envelope command, which will give me the bounding box of a geography type, but given just two coordinates of a box, how can I get the other two (bottom right and top left).Hope this is clear.. any help would be much appreciated. thanks!Duncan.The bottom left should be expressed as (MINX,MINY) and the top right as (MAXX, MAXY) so the other two can be derived (MINX, MAXY) is top left and (MAXX, MINY) is bottom right. dburtenshaw Grasshopper Group: General Forum Members Points: 14 Visits: 203 "The bottom left should be expressed as (MINX,MINY) and the top right as (MAXX, MAXY) so the other two can be derived (MINX, MAXY) is top left and (MAXX, MINY) is bottom right."Thank you for your response Batgirl, that makes sense, I will have a play tomorrow.D. John Jakob SSChasing Mays Group: General Forum Members Points: 656 Visits: 8 If what they're saying is true, the 4 coordinates are simply:(MINX, MAXY) ------------ (MAXX, MAXY) (MINX, MINY) ------------ (MAXX, MINY)Height = ABS(MAXY - MINY)Width = ABS(MAXX - MINX) duncanburtenshaw Mr or Mrs. 500 Group: General Forum Members Points: 599 Visits: 672 Worked a treat, thanks all for your input - my GSCE maths escaped me and I was looking for an over engineered solution..!