[Qgis-user] Working with field calculator on QGIS 1.8.0

lami at gis3w.it lami at gis3w.it
Thu Jul 5 09:32:03 PDT 2012


Sorry,

this is the rigth expression:

case when "COVER"  = 'A' THEN 1 ELSE 2 END


but you have to sign the box in the "update existing field" and choose the
field "NEW_cover"

Regrads

Leonardo



Leonardo Lami
Gis3W
e-mail: lami at gis3w.it
Cell: 349 1310164
Web: www.gis3w.it


On Thu, 5 Jul 2012 10:10:10 -0600, Manuel Spínola <mspinola10 at gmail.com>
wrote:
> Thank you very much Leonardo.
> 
> No, it didn't work.
> 
> Manuel
> 
> 2012/7/5 <lami at gis3w.it>
> 
>>
>> Hi Manuel,
>>
>> Try:
>>
>> case when "COVER"  = 'A' THEN "NEW_COVER"  = 1 ELSE "NEW_COVER"  = 2
END
>>
>> Best,
>>
>> Leonardo Lami
>>
>>
>> Gis3W
>> e-mail: lami at gis3w.it
>> Cell: 349 1310164
>> Web: www.gis3w.it
>>
>>
>>
>> On Thu, 5 Jul 2012 09:26:41 -0600, Manuel Spínola
<mspinola10 at gmail.com>
>> wrote:
>> > Dear list members,
>> >
>> > I am using the field calculator in 1.8.0 (Mac OS)
>> >
>> > I am creating a new field (column) called NEW_COVER and I want to
>> > assign
>> a
>> > value of 1 to the value A of the existing field (column) Cover and 0
to
>> the
>> > value B.
>> >
>> > Field: Cover
>> > Values: A, B
>> >
>> >
>> > In the Expression window I have:
>> >
>> > 'A' = 1
>> >
>> > But when I click OK, I don't get the result that I was expecting, to
>> have a
>> > value 1 on the new field NEW_COVER.
>> >
>> > What I am doing wrong?
>> >
>> > Best,
>> >
>> > Manuel
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>



More information about the Qgis-user mailing list