0

Why is arcpy.Describe(file.shp).extent overshooting the extent? Screenshot below. I have confirmed there are no tiny lines lingering out at the edges. I'm in UTM coordinates.

extent = arcpy.Describe(Lines.shp).extent
xmin = extent.XMin
xmax = extent.XMax
ymin = extent.YMin
ymax = extent.YMax

print xmin, xmax, ymin, ymax

enter image description here Print output:

540375.245005 546724.102422 3814174.9483 3818495.05067

EDIT: I tried adding in a minimum bounding geometry, still same issue.

test_out = outpath + '\\' + 'temp_convexHull.shp'
arcpy.MinimumBoundingGeometry_management(Lines.shp, test_out, "CONVEX_HULL", "ALL", "", "")

extent = arcpy.Describe(test_out).extent
xmin = extent.XMin
xmax = extent.XMax
ymin = extent.YMin
ymax = extent.YMax

print xmin, xmax, ymin, ymax

enter image description here

0
2

Your thinking is slightly wrong

xmin = extent.XMin
xmax = extent.XMax
ymin = extent.YMin
ymax = extent.YMax

gives you this and it is OK and what envelope means.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.