Virtual Fields – huh?
So something else new in QGIS 2.6. In case you aren’t familiar with QGIS – you have a field calculator. It’s as the name implies – a place to calculate attribution and a chance to get technical with expressions if needed.You can calculate areas, do string manipulation, and release your inner math demon.
If I can walk you through an example of why this is cool and your brain can run with ideas. I have a polygon that I’m working on with my clients. They wish to know how big of an area the polygon covers. So I’m going to create a new field called vArea (just so I can remember it’s virtual).
Note I’m adding a field with a expression. In this case I’m getting the area in Acres (Area in square feet / 43560). I’ve got an area of 82.736 Acres. As is usual the polygon is wrong and I’ve got to adjust it. So with their help I’m now readjusting the boundary from:
and just for fun I reopen the attribute table and:
My vArea has changed to 99.983 Acres. The virtual field updated. For the record this was all done with a shapefile. The only time you see behavior like this is (in my opinion) when you deal with a database, or a carefully worked script/plugin/extension, or for those of us who have dealt with a file based geodatabase (those will keep up with area but not calculations).
Once I remove the layer from QGIS the field Vanishes. So far the field has stayed if the layer stays in the QGIS project (save close and reopen a project).
It’s impressive. It’s cool. It’s Free and Open Source from the hard working developers of QGIS.