Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have implemented DBScan in vb.net (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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.