0

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.

Vince
  • 20,017
  • 15
  • 45
  • 64
  • If the difference between the to 2 X's and Y's are not the same then it's not square, what ever you do will return a rectangle. If this is not the case you need to edit your question and show why. – Hornbydd Aug 17 '23 at 21:41

1 Answers1

1

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.

FelixIP
  • 22,922
  • 3
  • 29
  • 61