3

I have a .shp which had undergone some edits to the attribute table a while back. A formula was used to recalculate some of the field values. I now don't have access to the knowledge of how these fields were calculated. Does QGIS store this type of information anywhere in the file of is it lost after the calculations are done? I could attempt a reverse calculation but this would prove somewhat time consuming and would prefer to get it straight from the horses mouth.

3

For normal fields - no.

For virtual fields - yes. You can see the expression used in Layer Properties > Fields, locate your relevant field and the expression used will be shown in the Comment section. The expressions themselves are saved in the QGIS project file (.qgs).


EDIT:

Actually the above is not completely 100% true. If you use the Field Calculator on normal fields from the Processing Toolbox, you can check the History of algorithms used by going to the toolbar:

Processing > History...

Here it records all the algorithms and all parameters used from the toolbox. From here, you would be able to see the formula used. But using the core Field Calculator from QGIS does not, to my knowledge, record formulas used.

1

For all the layers, you can always retrieve the last commands/formulas (19 in my case) in Recent (fieldcalc)(Field Calculator)

enter image description here

There are saved in the preference file of QGIS (org.qgis.qgis2.plist in Mac OS X)

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.