2011/12/14 Antonio Falciano <span dir="ltr"><<a href="mailto:afalciano@yahoo.it">afalciano@yahoo.it</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Great, Iacopo! I had not thought this kind of solution.<br>
I'm happy to know that someone likes to use Jython with gvSIG!<br>
A public script repository is missing yet. I hope that it will be very<br>
soon thanks to the new scripting capabilities of gvSIG 2.0.<br></blockquote><div><br></div><div>Thanks for sharing this issue on the list! I think scripting is a very powerful tool for many GIS users.</div><div><br></div>
<div>I miss very much documentation, manual, tutorials and/or examples for this topic. Time ago, I tried to use it, but I gave up shortly thereafter because my lack of knowledge about it.</div><div><br></div><div>Maybe a short post in the blog can be very very useful to start working... :-)</div>
<div><br></div><div>Volunteers?</div><div><br></div><div>Regards,</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Antonio<br>
<br>
Il 14/12/2011 11.50, iaborsi ha scritto:<br>
<div class="im">> SOLVED!<br>
> It is enough to save the new Module(s) within the following gvSIG path:<br>
><br>
> /bin/gvSIG/extensiones/org.gvsig.scripting/scripts/jython/Lib<br>
><br>
> Of course, the Module has to be Jython compliant.<br>
><br>
> Regards,<br>
> Iacopo<br>
><br>
><br>
> Iacopo Borsi<br>
> Dipartimento di Matematica U.Dini<br>
</div>> Università di Firenze.<br>
<div class="im">> V.le Morgagni 67/A<br>
> 50134 Firenze - Italy<br>
> Tel. <a href="tel:%2B39.0554237147" value="+390554237147">+39.0554237147</a><br>
> Fax. <a href="tel:%2B39.0554237133" value="+390554237133">+39.0554237133</a><br>
</div>> e-mail [hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=0><br>
<div class="im">> Web: <a href="http://web.math.unifi.it/users/borsi" target="_blank">http://web.math.unifi.it/users/borsi</a><br>
> <a href="http://sidgrid.isti.cnr.it" target="_blank">http://sidgrid.isti.cnr.it</a><br>
><br>
> Quoting "Antonio Falciano [via OSGeo.org]"<br>
</div>> <[hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=1>>:<br>
<div><div class="h5">><br>
> ><br>
> ><br>
> > Il 13/12/2011 10.28, iaborsi ha scritto:<br>
> >> Hi Antonio,<br>
> >> thanks a lot! I've tried that: very easy, and it works perfectly!<br>
> >> I take this opportunity to make an additional question: if in writing<br>
> >> this Jython function I need additional Modules (typically an original<br>
> >> group of functions defined by myself) which is the right path to save<br>
> >> this stuff? I guess is the same directory from which I upload my Jython<br>
> >> function, isn't it?<br>
> >> To be clearer (following you example below): I want to modify your<br>
> >> example script "conversion.py" in this way:<br>
> >> -------<br>
> >> from MyNewModule import *<br>
> >><br>
> >> def m2tokm2(value):<br>
> >> temp=value/1000000<br>
> >> result = MyNewFunction(temp)<br>
> >> return result<br>
> >> -------<br>
> >> where MyNewFunction() is defined within the module MyNewModule.<br>
> >><br>
> >> I guess I have to save the module within the same path of<br>
> conversion.py.<br>
> >> Right?<br>
> ><br>
> > Good idea, Iacopo! Importing further modules would extend the<br>
> > potentiality of advanced expressions. It should be possible to import a<br>
> > module within the same path, however it returns always a Jython<br>
> > exception. Probably the simplest way to use other functions contained in<br>
> > other module(s) consists in processing them before, even if it's not<br>
> > pythonic at all.<br>
> ><br>
> > Cheers,<br>
> > Antonio<br>
> ><br>
> > --<br>
> > Antonio Falciano<br>
> > <a href="http://www.linkedin.com/in/antoniofalciano" target="_blank">http://www.linkedin.com/in/antoniofalciano</a><br>
> > _______________________________________________<br>
> > Gvsig_internacional mailing list<br>
</div></div>> > [hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=2><br>
<div class="im">> ><br>
> > To see the archives, edit your preferences or unsubscribe from this<br>
> > mailing list, please access this url:<br>
> ><br>
> > <a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > If you reply to this email, your message will be added to the<br>
> > discussion below:<br>
> ><br>
> <a href="http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7092993.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7092993.html</a><br>
> > To start a new topic under gvSIG users, email<br>
</div>> > [hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=3><br>
<div class="im">> > To unsubscribe from gvSIG users, visit<br>
> ><br>
><br>
><br>
> ----------------------------------------------------------------<br>
> This message was sent using IMP, the Internet Messaging Program.<br>
><br>
><br>
><br>
</div>> ------------------------------------------------------------------------<br>
<div class="im">> View this message in context: Re: Field Calculator: look for an<br>
> expression saved in a file<br>
</div>> <<a href="http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7093061.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7093061.html</a>><br>
<div class="im">> Sent from the gvSIG users mailing list archive<br>
</div>> <<a href="http://osgeo-org.1803224.n2.nabble.com/gvSIG-users-f2009903.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/gvSIG-users-f2009903.html</a>> at<br>
> Nabble.com.<br>
<div class="im">><br>
><br>
> _______________________________________________<br>
> Gvsig_internacional mailing list<br>
> <a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
><br>
</div><div class="im">> To see the archives, edit your preferences or unsubscribe from this mailing list, please access this url:<br>
><br>
> <a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br>
</div><div class="im">--<br>
Antonio Falciano<br>
<a href="http://www.linkedin.com/in/antoniofalciano" target="_blank">http://www.linkedin.com/in/antoniofalciano</a><br>
_______________________________________________<br>
Gvsig_internacional mailing list<br>
</div><a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
<div class="HOEnZb"><div class="h5"><br>
To see the archives, edit your preferences or unsubscribe from this mailing list, please access this url:<br>
<br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div>Juan Ignacio Varela García <br></div><div><br></div></div><br>