I am using basic version of ArcMap. I would like to extract only the portion of purple polygon inside the line boundary. How can I do that?
(The purple is ROW and the the blue line is the proposed road layout. I am trying to plot the impacted ROW.)
You need to convert the line to a polygon (perhaps using Feature To Polygon, I use ET GeoWizards) and then Clip or Intersect.
edit: is your ROW a polyline or polygon feature class? If polygon, just Clip or Intersect.
ROW is polygon. While the road layer is polyline. Its not doing what I want...
What is it doing?
Well actually I tried to convert the polyline to polygon using GeoWizards like you advised. However, it only converts maybe those lines that do not have gaps. How can I close all the line gaps first to convert to polygon?
(it only converted the inscribed circle to polygon)
Yes, you do need closed polylines. If ET GeoWizards Polylines to Polygons tool doesn't work, go to the Build Polygons tool in the Polygon toolset and follow those instructions.
Have a lot of lines...
Hmmm the dialog gives you an option (register the product). You could convert polylines to polygons using Python geometry objects, but I'm somewhat pressed for time at the moment.
Here is at least most of what you'd need to convert polyline to polygon via Python:
>>> in_lines = "open_lines" # input lines ... sr = arcpy.Describe(in_lines).spatialReference # CRS ... out_polys =  # output list ... with arcpy.da.SearchCursor(in_lines,'SHAPE@',spatial_reference=sr) as cursor: # loop through lines ... for row in cursor: # for each record ... new_polyline_array = arcpy.Array() ... for part in row: # for each geometry part, if multipart ... new_polyline_part_array = arcpy.Array() ... for pnt in part: # for each vertex ... new_polyline_part_array.add(pnt) # add the vertex to the array ... if not part.equals(pnt): # check if part is closed ... new_polyline_part_array.add(part) # if not, close it ... new_polyline_array.add(new_polyline_part_array) # add the parts to the output list ... out_polys.append(arcpy.Polygon(new_polyline_array,sr)) # convert the output list to polygon objects ... arcpy.CopyFeatures_management(out_polys,r'in_memory\out_polys') # write to disk
I am not much into programming. However, I tried a different approach and it worked.
1. I used DISSOLVE to convert all the polylines back to polylines. This takes care of all the gaps.
2. Used the ET GioWizards tool to convert the newly created polylines to polygon.
3. Used clipping features to selet only those that are impacting.
Thanks for all the help and suggestions...