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

  • 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

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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