I want to create a centerline from a river polygon using PolygonToCenterline. It works when I use the tool in ArcGIS, but when I run it from the script I get the following error:
AttributeError: 'module' object has no attribute 'topographic'
I need to be able to run it from the script. I use ArcGIS Pro 2.2.0 with an advanced license. I think I did it exactly as in the description. Any ideas what I could try? I added the code below:
# Import arcpy module import arcpy # Check out Production Mapping License arcpy.CheckOutExtension ('foundation') # Define variables river_polygon = r'C:\zhaw\masterarbeit\data\diego\typical_rivers.gdb\birs_2011' out_gdb = r'C:\zhaw\masterarbeit\data\diego\typical_rivers.gdb\centerline' # Execute Polygon To Centerline arcpy.topographic.PolygonToCenterline(river_polygon, out_folder)