Hi,sorry for regognizing to late that the conversation plugin of thunderbird send 4 replies to the mailing list and not to the original sender.
Seems to be a bug inthe plugin.
Greetings Malte Am 14.10.2012 15:37, schrieb Michaël Michaud:
Hi,I just committed a new attribute calculator plugin, adding very powerful capabilities to OJ. (available from r3048 in http://sourceforge.net/projects/jump-pilot/files/OpenJUMP_snapshots/) I have used this plugin for a long time for personal use, but extensive tests and true dynamiccapability were still missing to make it part of OpenJUMP.Hopefully, it is now good enough to be part of the distribution, let me know...You'll find the plugin in *Tools > Edit Attributes >**Beanshell Attribute Calculator**It can calculate a new attribute value using a beanshell script*, which makes it possible to use all java math functions + all jts geometry functions + all java stringfunctions etc. Here are some examples you can test : get a uppercase version of attribute NAME NAME.toUpperCase() replace null values by 'Unknown' string from NAME attribute : NAME == null ? "Unknown" : NAMEconvert an 'orientation' attribute from radian (counterclockwise) to degree (clockwise)-Math.toDegrees(orientation) or with geometry, compute the circularity indice of polygonal features / 4*Math.PI*(GEOMETRY.area/(GEOMETRY.length*GEOMETRY.length))/Of course, you need to know a bit of java/beanshell, but there are some snippets in the right panel to help beginners and to avoid typos (double click to copy an attributename or a function name). *The second news is that it can calculate attributes _dynamically_*To do that, I had to modify some core classes (like FeatureSchema and BasicFeature) I found a way to modify these classes so that it should not break compatibility, but it's hard to say it's 100% safe without more extensive test. Please, report anybug.To define a dynamic attribute, check the dynamic checkbox. It will add a "read-only"attribute (grayed in editable mode) which will be evaluated "on-demand".You can test it with the same scripts as above. This time, changing the source attribute will automatically change the derived attribute, a bit like formulas in anexcel spreadsheet. There are a few pre-defined functions to be able to use the selection or another dataset in the script. I will give some examples later.Dynamic attributes may be used for other purposes (maybe to link a layer to an external table dynamically). Not sure it can be done without modification,but I had also this idea in mind. Let's see. Have fun with OpenJUMP Michaël / / ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
<<attachment: weller.vcf>>
------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel