Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have implemented DBScan in (forced to...). I am using a progress bar to track other parts of this tool. These all are implemented in For loops. Therefore, incrementing the tracker is not problem. Set the step to 1 and check for cancel at the conclusion of each loop.

One key item in DBScan is that it pops n elements off the stack as it generates a cluster. This means that it is not a one iteration to one element mapping. I tried reassigning the step value with each iteration, but this results in the progress bar recomputing and redrawing occasionally.

What techniques have others used to implement an progress bar outside of a for loop? I am not worried about total accuracy, but would like a relatively close approximation that can scale across a range of input data sizes and total cluster sizes.

share|improve this question
I'm not sure about the DBScan, I've never used that one. Whenever I'm forced to use a while loop (IFeatureCursor) I set the step progressor using IFeatureClass.FeatureCount or ITable.RowCount to get the number of rows to be processed. Both interfaces need an IQueryFilter or Nothing for all rows in the table. If the features/table can be accessed using ArcObjects then these might help to at least give a reasonable estimate of how many rows are expected. – Michael Miles-Stimson Oct 13 '13 at 6:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.