![arcgis 10.3 convert polygon to polylines arcgis 10.3 convert polygon to polylines](https://s3-us-west-2.amazonaws.com/ist-app-support-files/000018461/00N39000003LL2C-0EMf2000000AARO.png)
However, if the field is of type floating point and the values are expressed as integers, then the output raster will be integer. If the input field contains string values, the output raster will contain an integer value field and a string field. If the field is integer, the output raster will be integer if it is floating point, the output will be floating point. The input field type determines the type of output raster.
![arcgis 10.3 convert polygon to polylines arcgis 10.3 convert polygon to polylines](https://storemedia.extension.iastate.edu/ProductMedia/15662/1_F.png)
Any feature class (geodatabase, shapefile, or coverage) containing polygon features can be converted to a raster dataset. getOutput ( 0 ) + " overlapping or shared boundary lines were found." ) except Exception as err : print ( err. getOutput ( 0 ) = "0" ): print ( "No overlapping or shared boundary lines were found." ) else : print ( result. GetCount_management ( "selection_lyr" ) if ( result. MakeFeatureLayer_management ( outFeatureClass, "selection_lyr", " \" LEFT_FID \" > -1" ) result = arcpy. PolygonToLine_management ( inFeatureClass, outFeatureClass ) # Select lines that have LEFT_FID values greater than -1 arcpy. workspace = "C:/data/landcovers.gdb" # Create variables for the input and output feature classes inFeatureClass = "bldgs" outFeatureClass = "bldgs_lines" # Use error trapping in case a problem occurs when running the tool try : # Run PolygonToLine to convert polygons to lines using default neighbor_option arcpy.
![arcgis 10.3 convert polygon to polylines arcgis 10.3 convert polygon to polylines](https://s3-us-west-2.amazonaws.com/ist-app-support-files/000018461/00N39000003LL2C-0EMf2000000AARs.png)
# import system modules import arcpy # Set environment settings arcpy. # Name: PolygonToLine_Example2.py # Description: Use PolygonToLine function to convert polygons to lines, # and report how many shared or overlapping boundary lines # were found. Syntax PolygonToLine_management (in_features, out_feature_class, ) Parameter For more details, see Geoprocessing with large datasets. This tool will use a tiling process to handle very large datasets for better performance and scalability. A new field, ORIG_FID, will be added to the output and set to the input feature IDs of each line.įor parametric (true) curve input features, the output lines will remain true curves even if they are split.
![arcgis 10.3 convert polygon to polylines arcgis 10.3 convert polygon to polylines](https://i.ytimg.com/vi/NYV_xcECTq0/mqdefault.jpg)
The attributes of the input features will be maintained in the output feature class. A multipart polygon will become a multipart line in the output. Each input polygon boundary will be written out as an enclosed line feature. If the checkbox Identify and store polygon neighboring information is unchecked (the neighbor_option is set to IGNORE_NEIGHBORS in scripting), the polygon neighboring relationship will be ignored. Multiparts in input polygons are not maintained the output lines are all singlepart.If a polygon overlaps another polygon, two output lines will be generated representing each crossing boundary twice: the first line will represent the outer boundary of one of the overlapping polygons, therefore, its LEFT_FID is the feature ID of the polygon it crosses and its RIGHT_FID will be its own polygon feature ID the second line will be in the opposite direction, splitting the other polygon, therefore, its LEFT_FID and RIGHT_FID will be the same as the other polygon feature ID.The line direction will be arbitrary the LEFT_FID and the RIGHT_FID will be set to the left or right polygon feature IDs accordingly. If two polygons share a portion of their boundaries, one output line will be generated representing the shared segment.If a polygon contains another polygon, one output line in the clockwise direction will be generated representing the shared boundary, with its LEFT_FID set to the outer polygon feature ID and the RIGHT_FID set to the inner polygon feature ID.Therefore, for a polygon with no neighbors to the left side (outside) of its outer boundary and the left side (inside) of the hole boundary, the resulting lines will have a value of -1 for LEFT_FID and the polygon feature ID as the RIGHT_FID. If the polygon has a hole, the hole (or inner) boundary is always stored in a counterclockwise direction. In a polygon geometry, the outer boundary is always stored in a clockwise direction.The following scenarios help you understand the process and output in more detail: The attributes of the input features will not be maintained in the output feature class. As illustrated above, the boundaries are converted to lines taking into account of crossing or shared segments two new fields, LEFT_FID and RIGHT_FID, will be added to the output feature class and set to the feature IDs of the input polygons to the left and right of each output line. If the checkbox Identify and store polygon neighboring information is checked (the neighbor_option is set to IDENTIFY_NEIGHBORS in scripting), the polygon neighboring relationship will be analyzed. Creates a feature class containing lines that are converted from polygon boundaries with or without considering neighboring polygons.