Select to view content in your preferred language

Minimum Bounding Geometry script do not work

1139
1
06-18-2013 10:30 PM
DmitryBubnenkov
Deactivated User
when I try to run next script http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000003q000000
I got next error:
C:\code>1.py
Traceback (most recent call last):
  File "C:\code\1.py", line 14, in <module>
    "CONVEX_HULL", "ALL")
  File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 252
1, in MinimumBoundingGeometry
    raise e
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Features: Dataset test.xml.shp does not exist or is not supp
orted
Failed to execute (MinimumBoundingGeometry).


My code:
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/code"

# Create variables for the input and output feature classes
inFeatures = "test.xml.shp"
outFeatureClass = "test_1.shp"

# Use MinimumBoundingGeometry function to get a convex hull area
#         for each cluster of trees which are multipoint features
arcpy.MinimumBoundingGeometry_management(inFeatures, outFeatureClass, 
                                         "CONVEX_HULL", "ALL")


the example (very tiny) is attached
Tags (2)
0 Kudos
1 Reply
ShaunWalbridge
Esri Regular Contributor
ArcGIS expects shapefiles adhere to a naming convention of 'name.shp' and related files share the same file name prefix. Trying to create a file called 'test.xml.shp' violates this convention, if you rename your Shapefile to 'test.shp' your script runs as expected.
0 Kudos