Martin Davis a écrit : > Not sure if this is quite on the same track, but I'm planning to make a > plugin which will allow JEQL to operate within JUMP. JEQL provides a > much higher-level language than Beanshell, so it might be close to what > you're looking for with a "Model Builder". > Great ! I often use SQL to query data on a postgis database, and I miss a similar tool to do the job on OpenJUMP layers. If I understood a bit what JEQL is, it will help me doing that, and more...
Michaël > Ultimately it would be cool to provide a Visual Programming interface to > JEQL, which would make this even easier to use. Does the Sextante Model > Builder provide a graphical interface? > > Michaël Michaud wrote: > >> Giuseppe Aruta a écrit : >> >> >>> Hi Michael, >>> a couple of question: >>> 1) Is it possible to create a bean tool which automatically calculate the >>> x,y coordinates of a point layer and write them as attributes? This script >>> will be quite useful for GPS support. >>> >>> >>> >> Sure, not very difficult, >> I put it here after. If you want to test it and if it suits your needs, >> we can add it to the distribution. >> >> >>> 2) One of the possible line od OJ development is the construction of a >>> "model buider" similar to one which in Sextante >>> (http://openjump.org/wiki/show/Google+Summer+Of+Code+Ideas+List), how >>> Beanshell can be useful for it? >>> >>> >>> >> I did not explore sextante yet, but I like very much the idea of model >> builder. >> As far as I can imagine a model builder, it uses interfaces with inputs, >> outputs and a methods to process data. >> The processing part could be defined as a script to include methods >> which are not proposed by the basic model builder. >> Exemple : >> The model builder may propose a "filter a featureCollection", "union a >> featureCollection", but miss a "explode a featureCollection containing >> geometryCollections". With beanshell, just do it yourself. It's just >> some thoughts, it may not be so easy to include scripting capabilities >> into such a model and its user interface. >> >> Michaël >> >> Here is the script to add XY attributes : >> >> // This script adds a new layer from a selected one >> // The new layer has two new attributes >> // containing X and Y of a coordinate >> >> import com.vividsolutions.jump.feature.*; >> import com.vividsolutions.jump.workbench.model.StandardCategoryNames; >> >> ll = wc.layerNamePanel.selectedLayers; >> if (ll.length != 1) wc.workbench.frame.warnUser("Exactly one layer must >> be selected"); >> else { >> fc = ll[0].featureCollectionWrapper; >> fs = fc.featureSchema.clone(); >> fs.addAttribute("X", AttributeType.DOUBLE); >> fs.addAttribute("Y", AttributeType.DOUBLE); >> resultFC = new FeatureDataset(fs); >> for (f : fc.features) { >> nf = new BasicFeature(fs); >> for (int i = 0 ; i < fs.attributeCount-2 ; i++){ >> nf.setAttribute(i, f.getAttribute(i)); >> } >> nf.setAttribute("X", f.geometry.coordinate.x); >> nf.setAttribute("Y", f.geometry.coordinate.y); >> resultFC.add(nf); >> } >> wc.layerManager.addLayer(StandardCategoryNames.RESULT, >> ll[0].name+"_XY", resultFC); >> } >> >> >> >>> Regards >>> >>> Peppe >>> >>> __________________________________________________ >>> Do You Yahoo!? >>> Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto >>> spazio gratuito per i tuoi file e i messaggi >>> http://mail.yahoo.it >>> >>> ------------------------------------------------------------------------------ >>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA >>> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise >>> -Strategies to boost innovation and cut costs with open source participation >>> -Receive a $600 discount off the registration fee with the source code: SFAD >>> http://p.sf.net/sfu/XcvMzF8H >>> _______________________________________________ >>> Jump-pilot-devel mailing list >>> Jump-pilot-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>> >>> >>> >>> >>> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise >> -Strategies to boost innovation and cut costs with open source participation >> -Receive a $600 discount off the registration fee with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> >> > > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel