I have an ArcPy script that densifies polylines — to preserve any true curves that were in the features:
(the curves become densified straight segments)
with arcpy.da.UpdateCursor(fc, 'SHAPE') as cursor:
for row in cursor:
feature = row[0].densify ("ANGLE", 10000, 0.174533) #0.174533=radians
Details:
I don't want to densify straight segments, since that's not necessary here. I only want to densify the curved segments.
So, in the densify function, I only really care about the TYPE and DEVIATION arguments. I don't need the DISTANCE argument, since all it seems to accomplish is adding vertices to straight segments (not what I want).
densify (type, distance, {deviation})
densify ("ANGLE", 10000, 0.174533) #0.174533=radiansWith that said, I've noticed that the DISTANCE argument is mandatory. So I work around it by putting a dummy value of 10,000 meters in it, since there would never be a segment that big in my data. (I tried setting it to None but I got an error.)
Question:
Is there a reason why is the DISTANCE argument a required argument? Why can't it be optional, since for cases like mine, I don't want to specify it?
Have I misunderstood something?
Thanks.