I am on ArcGIS 10.3.1. I have a point feature class that represents the corner vertices of the polygons. They are located in a regular grid. The labels represent the OBJECTID. The points can be digitized in a random order with no sequence whatsoever. There are no attributes defined.

Source points

What I need to do is to create individual polygons (essentially connecting points with certain nearly located points). If I will be able to connect them as on the figure below, I would create polygons from those lines (ie polygons (17,18,21,22);(18,19,22,23) and so forth). The sequence of vertices in the polygons doesn't matter.

The required output

Since those polygons can vary in the shape (can be squares or rectangles with varying side size), I have a hard time finding an algorithm to connect only certain points (in human terms, only horizontally or vertically). Relying on the lat/long is not an option since the points may not lay exactly on the same coordinate lines (ie, may be shifted as below). However, all points in "rows" and "columns" lay on the imaginary line that would go through the edge points of the grid (ie, points 22,23,29 lay on the line that go from 21 to 24).

rotated points

I am trying to automate the process fully, but if certain steps that don't require much time would be needed to get done manually, it's acceptable. In other words, I am looking for any way to speed up this process.

I use arcpy and Python techniques for finding the 5 nearest points for each points and connect them by creating a new line segment. As you can see, some of the lines created go as diagonals within the rectangles created and should be cleaned up.

Current results

Things can get harder when the grid has varying the distance between columns/rows such as on this picture (point 22 gets connected not only to 28, but also to point 27 - outside the rectangle created).

enter image description here

I have looked at Parcel Editor in ArcGIS - couldn't find any option that would let me to create polygons automatically. I have a feeling that finding out the sequence of filtering the lines & resultatnt polygons and re-iterating the output I could get sufficiently good results.

Does anyone have any good tips on how to approach this problem to create polygons from the points representing the corners?

  • Have you looked at creating a TIN and removing the diagonals?
    – Vince
    Sep 25, 2015 at 13:40
  • 1
    Thanks, @Vince. The Create TIN tool I just run using the field Height (with the constant value of 1 for all points) gave me single filled area with no lines connecting points. I guess this is an expected behaviour. Changing the symbology to Edge from Elevation, does draw the lines. TIN Triangle GP tool does export them to polygons, but I need to clean them up anyway again :) Sep 25, 2015 at 14:19
  • For any right triangle polygon, it should be easy to identify the diagonal. Finding the matched neighbor is a simple midpoint circle search. If you sort beforehand (for performance), and add an attribute with an incrementing id for matched pairs, then a dissolve will give you the rectangles.
    – Vince
    Sep 25, 2015 at 14:54
  • Have a look at gis.stackexchange.com/questions/131913/…
    – FelixIP
    Sep 26, 2015 at 0:05
  • My solution hyperlinked above == @Vince suggestion
    – FelixIP
    Sep 26, 2015 at 0:16

1 Answer 1


Let’s try to restore rectangles shown, using corner points (red) enter image description here

and B.N.Delaunay triangles:

enter image description here

Name triangle edges and calculate their length:

enter image description here

Spatially join triangles to edges:

enter image description here

Sort joined table in descending order using edge length:

enter image description here

Select all non-first occurrences of triangles in joined table

enter image description here

Switch selection and dissolve triangles using longest common edge:

enter image description here

Delete all shapes where point count <> 5. Remaining shapes shown below:

enter image description here

As one can see algorithm won’t work with more than 1 smaller rectangle per bigger. Narrower rows/columns are Ok, thus you are covered.

Note: I used my own scripts to sort table and find ‘duplicates’ because I don’t have advanced license.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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