0

I am trying to divide irregularly shaped polygons at specific points. I don't have any fields that inform the angle at which the polygons should be divided.

I am using Create Thiessen Polygons which generally wants to build a polygon around a point, such that it is centered, rather than with the point at the edge.

Is there a way to force the polygons to be shifted such that they are along the points? Is there a different tool I should use? I have sketches below of input, current output, and desired output. (And the next step is to intersect the base polygon with the output Thiessen polygons; that is the final answer, but I have left it out here because it is a simple step.)

This is related to ArcGIS force Thiessen polygons to be larger or alternative tool?, but this is a new/separate question because of the shifting vs. centering issue.

import arcpy
    
#mypoly = filepath to my polygon SHP
#mypts = filepath to my points SHP
#myoutput = filepath to save Thiessen polgons output

arcpy.env.extent = mypoly
arcpy.CreateThiessenPolygons_analysis(mypts, myoutput)

enter image description here

enter image description here

enter image description here

2
  • 1
    Do you have an advanced license? If so near may help, it will give you the ID of the closest line, output of Thiessen polygons converted to line, and an angle, add or subtract 90 degrees then extend a line both sides to the extent and use the method in the answer gis.stackexchange.com/questions/316559/… (also works in ArcMap) Feb 23 at 1:51
  • 1
    In theory, you could construct lines from the points, intersect them with the Thiessen rings, and build a new point set for a second Thiessen, clipped to the polygon extent. I worry about drift, but it might work.
    – Vince
    Feb 23 at 2:37
3

Hard to understand what you want, this is how I see it (similar to @Michael Stimson. Create polygon outlines, and generate near table. Add 2 more columns (highlighted in a picture below): enter image description here

Calculate coordinates of point 'opposite' to nearest with big enough distance. This is how I computed OPP_X:

!FROM_X!-500*math.cos(math.radians( !NEAR_ANGLE! ) )

Construct lines from above table (XY to line) using near and opposite pairs and IN_FID as line ID.

Result might surprise you:

enter image description here

2

I ended up making a polyline out of the points, splitting the polyline at each point, and getting the midpoint of each split polyline. Then I did the Thiessen polygons on the midpoints.

import arcpy

arcpy.PointsToLine_management(SHP_IN_PTS, templine1)
arcpy.SplitLine_management(templine1, templine2)
arcpy.AddGeometryAttributes_management(templine2, "LINE_START_MID_END")
arcpy.MakeXYEventLayer_management(templine2, "MID_X", "MID_Y", "pts_layer",
                                  arcpy.SpatialReference(4326))
arcpy.FeatureClassToFeatureClass_conversion("pts_layer", outpath, 'temp_midpoints.shp')

arcpy.env.extent = SHP_IN_POLY
arcpy.CreateThiessenPolygons_analysis(midpoints, thiesspoly)

arcpy.Intersect_analysis([SHP_IN_POLY, thiesspoly], SHP_OUT_POLY_FINAL)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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