I have downspout points that are currently emptying at the foundation. We need to redirect those into the roadway to be collected by the storm sewer. However we need to check that there is enough vertical elevation change between the base of the house and the curb to slope the pipe appropriately (e.g. if the downspout is 50ft away and the elevation at the foundation is 700ft and at the curb 699ft and I need 18" of cover then this will not work). So I need to construct a line from every single downspout point that connects to the edge of pavement line and get the elevation at each end. This line also needs to meet the edge of pavement line at a 90-degree angle. I have over 4000 downspouts so I'm looking for a way to automate the generation of the line segment between the two in such a way that when I calculate the start and end elevation using my DEM I will know my grade change.
arcpy.Near_analysis("CON_POINT", "Kerblines", "LOCATION") arcpy.TableToTable_conversion("CON_POINT","../SCRATCH.gdb", "XYtable") arcpy.MakeXYEventLayer_management("XYtable", "NEAR_X", "NEAR_Y","XYtable_Layer") arcpy.Merge_management("CON_POINT;XYtable_Layer", "../merged.shp") arcpy.PointsToLine_management("merged","../connections.shp", Line_Field="PAR_ID") arcpy.InterpolateShape_3d("DEM", "connections", "../CON_3D.shp") arcpy.AddField_management("CON_3D", "SLOPE") # field calculator (!Shape!.lastPoint.Z- !Shape!.firstPoint.Z)/ !Shape!.length*100