Beanshell is a very nice tool.
I used JRuby in OpenJUMP to create the complete list of PlugIns (see
another mail on this list). I've added the Ruby source code to the code
paste: https://gist.github.com/1361280
I think the normal development workflow with scripts such as Beanshell
or JRuby in OpenJUMP should be such like:
(10) Create a script file manually in scripts folder.
(20) Open this script in external text editor.
(30) Refresh script list in Bean shell menu within OpenJUMP for the new
entry.
(40) Edit the script file in external text editor.
(50) Run the script in OpenJUMP.
(60) Evaluate the output.
(70) GOTO 40.
Greetings
Benjamin
2011/11/15 Stefan Steiniger <sst...@geo.uzh.ch>
> wow!
>
> I should really consider to learn
> (a) more about Beanshell (never used it)
> (b) coordinate filter
>
> I would have programmed it as plugin... with probably consuming way more
> time.
>
> stefan
>
> PS: can we find a spot for that on the wiki, or better adding it to
> built-in the Beanshell functions?
>
> Am 14.11.11 17:04, schrieb Michaël Michaud:
> > Hi Jukka,
> >
> >> After this introduction I wonder if it could be possible to convert the
> whole layer with OpenJUMP so that the result would keep all the attributes
> but have all the coordinates in reversed x and y coordinate order? So this
> >> LINESTRING (6610069.234 170739.665, 6606506.505 184937.743) would
> become
> >> LINESTRING (170739.665 6610069.234, 184937.743 6606506.505). Perhaps
> it could be handled by some BeanShell or Python tool?
> > Try to copy paste the following script in beantools folder
> > Should switch longitude and latitude for all the selected layers
> >
> > //Inverse longitude and latitude - Michael Michaud 2011-11-15
> > import com.vividsolutions.jump.workbench.model.Layer;
> >
> > // Create the filter
> > public CoordinateFilter switchLatLon = new CoordinateFilter() {
> > void filter(Coordinate coord) {
> > t = coord.x;
> > coord.x = coord.y;
> > coord.y = t;
> > }
> > };
> > // apply
> > for (Layer lyr : wc.layerNamePanel.selectedLayers) {
> > for (Feature f : lyr.featureCollectionWrapper.features) {
> > f.geometry.apply(switchLatLon);
> > f.geometry.geometryChanged();
> > }
> > }
> > // refresh
> > wc.layerViewPanel.repaint();
> >
> >>
> >> -Jukka Rahkonen-
> >>
> ------------------------------------------------------------------------------
> >> RSA(R) Conference 2012
> >> Save $700 by Nov 18
> >> Register now
> >> http://p.sf.net/sfu/rsa-sfdev2dev1
> >> _______________________________________________
> >> Jump-pilot-devel mailing list
> >> Jump-pilot-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >>
> >>
> >
> >
> >
> ------------------------------------------------------------------------------
> > RSA(R) Conference 2012
> > Save $700 by Nov 18
> > Register now
> > http://p.sf.net/sfu/rsa-sfdev2dev1
> > _______________________________________________
> > Jump-pilot-devel mailing list
> > Jump-pilot-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel