Back on November 5, 2009 Nacho let us know about a problem with the UnionByAttribute plug-in. It was throwing an exception with Nacho's data. I couldn't help Nacho track down the problem because the exception didn't tell us what feature was causing the exception. I told him I would see about giving the plug-in the ability to report the bad feature to assist with troubleshooting. That was the first item on my todo list for work in preparation of the next OpenJUMP release. I'm starting to work on those tasks this week.
It seems like it would be helpful to have a standard way for plug-ins that operate on features or feature geometry to report the "bad features" that cause problems, especially those that result in exceptions that kill plug-in execution. I need to add this functionality to the UnionByAttribute plug-in, so I wanted to (1) see if we have an existing way to do this, and (2) propose a standard way for plug-in developers to do this that we could discuss a group if no solution exists. Let me know if you have already implemented a standard way of reporting bad feature data in your own plug-ins that I can imitate. I attached an interface for a BadFeatureDataReporter. It has one important method that allows the plug-in to submit a list of bad features. We could implement this interface with a reporter that wrote out the bad feature to a default shapefile (or at least the feature geometry to a well known text file) and then uses the workbench to warn the user that there was a problem. We could then make the default reporter available through the plug-in context or maybe the Registry. I'm thinking if I find a bad feature when processing data in the UnionByAttribute plug-in that I should skip it and continue processing after reporting. That seems a little more robust than ignoring the rest of the selection after the bad feature is encountered. Thanks for any feedback. The Sunburned Surveyor
BadFeatureDataReporter.java
Description: Binary data
------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel