[Gvsig_english] Interesting question about Field Calculator

Antonio Falciano afalciano at yahoo.it
Fri Sep 27 11:39:19 CEST 2013


Il 27/09/2013 11:14, Antonio Falciano ha scritto:
> Il 27/09/2013 10:49, Jorge Gaspar Sanz Salinas ha scritto:
>> I'm subscribed to gvSIG questions on GIS StackExchange site and
>> yesterday one arrived that I can't directly answer but I'm interested to
>> pass here, looking for more skilled users of the Field Calculator of
>> gvSIG 1.12
>>
>> http://gis.stackexchange.com/questions/72579/correctly-calculating-attribute-table-column-in-gvsig
>>
>> The problem is quite easy but I don't know if accessing a particular
>> field based on the value of another is possible without doing some
>> scripting.
>>
>> Any ideas to help this user?
>
> Hi Jorge,
> we have just discussed about this question in this thread:
> http://listserv.gva.es/pipermail/gvsig_internacional/2013-September/009076.html
> IMHO it's not possible to calculate such field without scripting,
> because the references of the fields are not static, but change
> according to a specific value.

Forget my last assumption. :) In first approximation, we should solve
the problem with this expression too (not tested):

([Land-use B]=="Agr")*[Agr]+
([Land-use B]=="Urb")*[Urb]+
([Land-use B]=="For")*[For]+
([Land-use B]=="Com")*[Com]+
([Land-use B]=="Pub")*[Pub]

We should also check if Land-use B assumes other values which don't
match with the available fields, because 0 is a possible score.

Cheers,
Antonio

-- 
Antonio Falciano
http://www.linkedin.com/in/antoniofalciano


More information about the Gvsig_internacional mailing list