Monthly Archives: June 2013

Where ArcGIS 10.1 stores sde files

Want to know where ArcGIS stores the *.sde files, then look below:


In Windows XP they were here:
C:\Documents and Settings\username\Application Data\ESRI\ArcCatalog

In Windows 7 they are here:

If not there, try here:


Creating a Convex Hull with Points

Using a point featureclass as the input and a target polygon featureclass as the output to put the convex hull into, just use the following code:

def CreateConvex(inputfc, outputfc):
    pointArray = arcpy.Array()
    totalrows = arcpy.GetCount_management(inputfc)
    print "Points total is {0}".format(int(totalrows.getOutput(0)))

    #Loop through points in FC (points)
    desc = arcpy.Describe(inputfc)
    shapefieldname = desc.ShapeFieldName
    fields = ["SHAPE@"]
    with arcpy.da.SearchCursor(inputfc, fields) as cursor:
        for row in cursor:
        pnt = row[0].getPart()

    pointMultipoint = arcpy.Multipoint(pointArray)
    pointArray.removeAll() #frees up memory
    convexPolygon = pointMultipoint.convexHull()

    #Insert into output featureclass
    insertCursor = arcpy.da.InsertCursor(outputfc, ("SHAPE@"))
    del insertCursor #This actually inserts the row - very important!
    print "Inserted convex polygon"