multiple ring buffer performance issues

3296
5
02-18-2018 08:41 AM
Labels (1)
RiccardoKlinger2
Occasional Contributor

I just computed multiple ring buffers for a point in EPSG 4326 with a 100m intervall for a maximum distance of 1000m. I was observing a calcualtion time of approx. 50s within ArcMap, 4min in ArcGIS Pro and 40s as a processing service.
Yet I would love to see the same performance in ArcMAP as well as ArcGIS Pro because I am shipping a toolbox with this arcpy command:

def createDistances(incr,maximum):
    #as we have the raster now, we will need a multiple ring buffer:
    distances = []
    for dist in range(incr,maximum+1,incr):
        distances.append(str(dist))
        distancesString = ";".join(distances)
    return distancesString
distancesString = createDistances(100,1000)
arcpy.analysis.MultipleRingBuffer("Your single point feature", r"your ring buffer name", distancesString, "Meters", "distance", "ALL", "FULL")‍‍‍‍‍‍‍‍‍‍


Are there ways to increase calculation times in ArcGIS Pro?

I am running this on a X270 with this spec:

Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz, 2904 MHz, 2 Cores, 4 logical processors
16Gb Ram, SSD

no dedicated GPU.

5 Replies
LarsSchmitz
Occasional Contributor III
0 Kudos
LarsSchmitz
Occasional Contributor III

Is this question still open, r.klingeresri-de-esridist‌?

0 Kudos
BugPie
by
Occasional Contributor III

Wondering if there was a solution or more chatter to this?

We are beginning to implement Pro in our organization but have found that when creating multi-ring buffers there is a delay (up to 10 minutes???) to finish the process? IS this a system resource/hardware issue or do others find that this simple tool doesn't work very well with Pro? 

0 Kudos
RiccardoKlinger2
Occasional Contributor

Hi Collin,

Just checked this python toolbox back in ArcMAP 10.6 AND ArcGIS Pro 2.1.3 and 2.2.

import arcpy


class Toolbox(object):
    def __init__(self):
        """Define the toolbox (the name of the toolbox is the name of the
        .pyt file)."""
        self.label = "Toolbox"
        self.alias = ""

        # List of tool classes associated with this toolbox
        self.tools = [Tool]


class Tool(object):
    def __init__(self):
        """Define the tool (tool name is the name of the class)."""
        self.label = "Tool"
        self.description = ""
        self.canRunInBackground = False

    def getParameterInfo(self):
        """Define parameter definitions"""
        point = arcpy.Parameter(
            displayName= "buffer center",
            name="buffer center",
            datatype="GPFeatureRecordSetLayer",
            parameterType="Required",
            direction="Input")
        params = [point]
        return params

    def isLicensed(self):
        """Set whether tool is licensed to execute."""
        return True

    def updateParameters(self, parameters):
        """Modify the values and properties of parameters before internal
        validation is performed.  This method is called whenever a parameter
        has been changed."""
        return

    def updateMessages(self, parameters):
        """Modify the messages created by internal validation for each tool
        parameter.  This method is called after internal validation."""
        return

    def execute(self, parameters, messages):
        import time;
        """The source code of the tool."""
        def createDistances(incr,maximum):
            #as we have the raster now, we will need a multiple ring buffer:
            distances = []
            for dist in range(incr,maximum+1,incr):
                distances.append(str(dist))
                distancesString = ";".join(distances)
            return distancesString
        distancesString = createDistances(100,1000)
        i=0;
        while i<10:
            start = time.time()
            arcpy.analysis.MultipleRingBuffer(parameters[0].value, "tester" + str(i), distancesString, "Meters", "distance", "ALL", "FULL")
            end = time.time()
            arcpy.AddMessage(end - start)
            i+=1
        return

The results show significant perfomance boost on my machine!

The raw values in seconds are shown  here:

I can see a performance bioost of about 20x compared to ArcMAP and 50x compared to ArcGIS Pro 2.1.3 using ArcGIS Pro 2.2

BugPie
by
Occasional Contributor III

Riccardo - This is great to see! Thanks for putting this effort in to prove this out. I can already report back that others on my team have tested this out in Pro 2.2 since reading this response and have reported that the tool does seem to run much faster. 

Sure wish this Pro app was really up to the challenge of Production usage. It's things like this that are delaying our implementation. Frustrating. 

Cheers!