Polygon – Creating Square Polygons from Two Known Diagonal Corner Vertices

arcgis-profeaturespolygonremote sensing

Similar question to
How to make a square out of two points?— I have a CSV file with coordinates for the bottom left and top right corners of multiple sampling plots and would like to make individual square (all sides equal length) polygons for each of these plots.

I have tried converting the corner points to lines and then using the minimum bounding geometry tool but this produces rectangular polygons that do not match the shape or orientation of the sampling plots.

Best Answer

One of the obvious solutions is this:

enter image description here

where radius of circles equals to Line_Length/sqrt(2). Four points shown will make a square. Unfortunately it gets tricky when each buffer intersects more than one buffer:

enter image description here

So, you have one diagonal of square, simply compute 2nd perpendicular to 1st using clone of your lines. Note you don't need to compute mid point. Simply use:

RotateExtend(!Shape!,!Shape!.length/2)

to call expression on field Shape of cloned table. You might need to start editing session first if clone sits in GDB.

Merge 2 line feature classes and dissolve to multipart using initial line id. Picture below shows minimum bounding geometries of dissolved lines:

enter image description here

Yes, I've misread the question in your hyperlink, unless he wanted rectangle but square.