New version of gvSIG 2.5 brings a new functionality that increase the power of gvSIG in a big way. It can be use in different parts of gvSIG. This new functionality is called Expressions.
What is an Expression?
An expression is a formula used for calculations. For example, if we want to create a selection or calculate new values, those can be done by an expression.
We have created a window to create these expressions and you will find it in different places in gvSIG Desktop. This windows could present modifications depending of the purpose of the tool in that moment.
In what kind of operations can be useful?
We have introduce support for simple and really advanced calculations using this expressions. Now it will be possible to operate between different types of fields (text, numbers, dates..), new type of classes more common in programming (color, images,…) and very important, calculations with geometries, to get information (get vertex, perimeter, area,..) or to create/modify the geometry (buffer,…)
And the power of the expressions doesn’t end there, it can be use for more powerful calculations. In this operations can be use different layers, we can create joins between tables or introduce programming code directly in the expression and much more.
Also, we can access easily to others parts of gvSIG. For example, we can access to point saved in the plugin “Coordinate Capture” to create expressions with this points.
Where can be use?
We are adding this functionality in multiple parts of gvSIG day by day.
It can be use to create advanced selections.
In the Field Calculator we can use expressions to create new values for our tables through advanced calculations.
For example, we can create an unic identifier in this table. It will add multiple field as text and then it will add at the end a text:BIG if the area of the geometry is bigger than 100, or SMALL if is smaller.
CONCAT('IDENTIFIER__', TYPE, '-', NAME,'-', IFF(VAREA>100,'BIG','SMALL'))
This expressions can also be use in the virtual fields. A virtual field is a field that works as a expression, and it stores the expression, not the value. If you modify some of the parameters of the formula, the virtual field will change.
For example in this case we have a virtual field AREA with this formula ‘ST_AREA(GEOMETRY)’ so it calculates the area of that geometry. If we change the geometry, the value of the expression will change.
In the geoprocess framework we can find the parameter ‘Filter expression’ that works for filter de input features of the layer.
Every day we are introducing some of this expression in multiple parts of gvSIG for everything: calculations, filters, create exports, etc.
We will create a special documentation just for create expression. It will be ready soon.
This is one of the biggest improvement in gvSIG 2.5 and it can be tested in the last builds of gvSIG 2.5.
If you have any doubt or you find any error you can send us the information through the mailing lists.