Skip to main content
5 of 5
formatting
mxfh
  • 715
  • 6
  • 11

As a workaround to the lack of this in QGIS you could open the .dbf file of your shapefile set (export it to shapefile first if you are using a different format) and open it in Libre Office Calc (or openoffice, MS Excel 97/2003) to calculate the field in a new column with one of the following formulas:

=LOG(Number,Base)
=LOG10(Number)
=LN(Number)

You can use practically all spreadsheet functions this way as long your feature count doesn't go into the millions and you don't reorder or delete any rows.

Make sure the header of the column is DBF compatible

  1. field Name (10 characters max)
  2. data type (most likely N for numeric or C for character strings)
  3. field length (including decimals)
  4. number of decimals (optional for N)

Example:

VALUE_LOG,N,24,12

Backup the original .dbf before you make any saves and save/replace the opened one as a dBase (.dbf) file.

One .dbf may only be opened for editing by one program at a time so make sure you unload the shapefile first in qgis before loading it in calc and vice versa.

mxfh
  • 715
  • 6
  • 11