In this example, I will construct the extent of a feature class as a polygon to clip another datasource:
import arcpy
dsParcel = r"c:\temp\sample.gdb\Parcels"
dsLandUse = r"c:\temp\sample.gdb\LULC"
pnt = arcpy.Point()
array = arcpy.Array()
extentParcel = arcpy.Describe(dsParcel).extent
coords = [[extentParcel.XMin,extentParcel.YMin],[extentParcel.XMax,extentParcel.YMin],
[extentParcel.XMax,extentParcel.YMax],[extentParcel.XMin,extentParcel.YMax]]
outLU = r"c:\temp\sample.gdb\clipLULC"
# Create Spatial Reference
sr = arcpy.SpatialReference()
sr.factoryCode = 4326
sr.create()
# Load the Location
for coord in coords:
pnt.X = coord[0]
pnt.Y = coord[1]
array.add(pnt)
polygon = arcpy.Polygon(array,sr)
arcpy.Clip_analysis(dsLandUse,polygon,outLU)
Notice how we didn't have the close the polygon! The object does it for us.
Enjoy