Does anyone know of a native Esri tool, Python, or R package that would allow one to emulate arcmap's graphic element toolbar functionality, but for shapefiles rather than graphic elements?

For example, the image below shows a layer containing multiple rectangles of varying size arranged in a quasi-gridlike pattern. Is there an existing tool that would allow me to nudge each rectangle such rectangles within some tolerance distance become perfectly aligned (using either an edge or the centroids) and distributed such that the spaces between them are uniform? Note that I'm looking to shift the entire polygons rather than moving only some of the vertices (e.g. by using using ESRI's snap tool).

If I were to do it manually, I could envision creating a 2nd layer composed of one or more rectangles and snapping features in the 1st layer to the nearest feature in the 2nd layer. However, this wouldn't necessarily handle the spacing between them properly.

rectangles that are imperfectly aligned and distributed

The suggestion from @klewis would work well for a one-off type situation. I'm more interested in an automated and reproducible/versatile strategy though. I'm using these "bounding boxes" as an intermediate step in the creation of "callout tables" (image below) based on data collected at points from which the leader lines emanate. I'm using the R arcgisbinding package to build the "tables" from the bounding boxes joined with the source data. As you mention, conversion to graphic elements would eliminate any possibility of performing table attribute joins.

I can envision adding a grouping field to the attributes of my rectangular table outlines that will allow me to generate a bounding box from a union by group. These group bounding coordinates could probably be used to do the alignment and distribution programmatically. I just wanted to avoid recreating something that already exists if at all possible.

callout table data

closed as too broad by PolyGeo Feb 10 at 22:45

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • A screenshot would help. PostGIS SnapToGrid might be the kind of tool/function you looking for, and/or ArcGIS snap tool – BERA Jan 9 at 20:29
  • Welcome to GIS SE! As a new user be sure to take the Tour to learn about our focussed Q&A format. Please decide which of the GIS products mentioned you want to ask about. By asking about more than one you are effectively asking multiple questions which goes against the Tour. You should then describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. – PolyGeo Feb 10 at 22:46

You can convert Polygons -> Graphics -> edits -> Graphics -> Polygons.

If you right-click the feature layer, you can convert Features to Graphics.
Then perform your Alignment, Distribution, Nudge, Rotation using the Drawing Toolbar.
On the Drawing toolbar, you can convert Graphics back to Features.
Of course you lose your attributes.

Not the answer you're looking for? Browse other questions tagged or ask your own question.