[Gvsig_english] Field Calculator: look for an expression saved in a file

Nacho Uve nachouve at gmail.com
Thu Dec 15 10:34:56 CET 2011


2011/12/14 Antonio Falciano <afalciano at yahoo.it>

> Great, Iacopo! I had not thought this kind of solution.
> I'm happy to know that someone likes to use Jython with gvSIG!
> A public script repository is missing yet. I hope that it will be very
> soon thanks to the new scripting capabilities of gvSIG 2.0.
>

Thanks for sharing this issue on the list! I think scripting is a very
powerful tool for many GIS users.

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.

Maybe a short post in the blog can be very very useful to start working...
:-)

Volunteers?

Regards,



>
> Cheers,
> Antonio
>
> Il 14/12/2011 11.50, iaborsi ha scritto:
> > SOLVED!
> > It is enough to save the new Module(s) within the following gvSIG path:
> >
> > /bin/gvSIG/extensiones/org.gvsig.scripting/scripts/jython/Lib
> >
> > Of course, the Module has to be Jython compliant.
> >
> > Regards,
> > Iacopo
> >
> >
> > Iacopo Borsi
> > Dipartimento di Matematica U.Dini
> > Università di Firenze.
> > V.le Morgagni 67/A
> > 50134 Firenze - Italy
> > Tel. +39.0554237147
> > Fax. +39.0554237133
> > e-mail [hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=0>
> > Web: http://web.math.unifi.it/users/borsi
> > http://sidgrid.isti.cnr.it
> >
> > Quoting "Antonio Falciano [via OSGeo.org]"
> > <[hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=1>>:
> >
> >  >
> >  >
> >  > Il 13/12/2011 10.28, iaborsi ha scritto:
> >  >> Hi Antonio,
> >  >> thanks a lot! I've tried that: very easy, and it works perfectly!
> >  >> I take this opportunity to make an additional question: if in writing
> >  >> this Jython function I need additional Modules (typically an original
> >  >> group of functions defined by myself) which is the right path to save
> >  >> this stuff? I guess is the same directory from which I upload my
> Jython
> >  >> function, isn't it?
> >  >> To be clearer (following you example below): I want to modify your
> >  >> example script "conversion.py" in this way:
> >  >> -------
> >  >> from MyNewModule import *
> >  >>
> >  >> def m2tokm2(value):
> >  >> temp=value/1000000
> >  >> result = MyNewFunction(temp)
> >  >> return result
> >  >> -------
> >  >> where MyNewFunction() is defined within the module MyNewModule.
> >  >>
> >  >> I guess I have to save the module within the same path of
> > conversion.py.
> >  >> Right?
> >  >
> >  > Good idea, Iacopo! Importing further modules would extend the
> >  > potentiality of advanced expressions. It should be possible to import
> a
> >  > module within the same path, however it returns always a Jython
> >  > exception. Probably the simplest way to use other functions contained
> in
> >  > other module(s) consists in processing them before, even if it's not
> >  > pythonic at all.
> >  >
> >  > Cheers,
> >  > Antonio
> >  >
> >  > --
> >  > Antonio Falciano
> >  > http://www.linkedin.com/in/antoniofalciano
> >  > _______________________________________________
> >  > Gvsig_internacional mailing list
> >  > [hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=2>
> >  >
> >  > To see the archives, edit your preferences or unsubscribe from this
> >  > mailing list, please access this url:
> >  >
> >  > http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
> >  >
> >  >
> >  > _______________________________________________
> >  > If you reply to this email, your message will be added to the
> >  > discussion below:
> >  >
> >
> http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7092993.html
> >  > To start a new topic under gvSIG users, email
> >  > [hidden email] </user/SendEmail.jtp?type=node&node=7093061&i=3>
> >  > To unsubscribe from gvSIG users, visit
> >  >
> >
> >
> > ----------------------------------------------------------------
> > This message was sent using IMP, the Internet Messaging Program.
> >
> >
> >
> > ------------------------------------------------------------------------
> > View this message in context: Re: Field Calculator: look for an
> > expression saved in a file
> > <
> http://osgeo-org.1803224.n2.nabble.com/Field-Calculator-look-for-an-expression-saved-in-a-file-tp7086102p7093061.html
> >
> > Sent from the gvSIG users mailing list archive
> > <http://osgeo-org.1803224.n2.nabble.com/gvSIG-users-f2009903.html> at
> > Nabble.com.
> >
> >
> > _______________________________________________
> > Gvsig_internacional mailing list
> > Gvsig_internacional at listserv.gva.es
> >
> > To see the archives, edit your preferences or unsubscribe from this
> mailing list, please access this url:
> >
> > http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
> --
> Antonio Falciano
> http://www.linkedin.com/in/antoniofalciano
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
>
> To see the archives, edit your preferences or unsubscribe from this
> mailing list, please access this url:
>
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>



-- 
Juan Ignacio Varela García
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20111215/37e27cda/attachment.htm 


More information about the Gvsig_internacional mailing list