[Qgis-user] combine field calculator functions

Michael Giebels giebels at meo-carbon.com
Tue Aug 6 07:11:03 PDT 2013


Hi Carlos,

thanks for your input. I tried this before. However I am not able to 
open *.dbf tables in Excel. It appears not to be readable in a suitable 
form (Yes, I do go the way over right click, show all files, open, and 
define seperators etc.). Somehow Excel does not read the row break 
properly (when I try to import the pure data without the header it tries 
to show all data in the first row and aborts due to limited number of 
columns in Excel). I tried different file origins (MacIntosh, Windows, 
DOS) as well. In a German forum I found information that Microsoft does 
not support *.dbf files anymore for Excel 2010 or higher which might 
explain that issue.

Btw: I am running QGIS 1.8 on a Mac OS X Version 10.7.5 (whom ever this 
information helps) with MS Excel for Mac2011 Version 14.3.6 on it.

I mentioned it before to Nathan already. All I want to do in the end is 
to convert six categories so I can display them in differing colors 
without creating new layers. But that is the way I have to do it in the 
end I guess.

Thanks for your replies and thanks for having me in the community

Michael


Am 06.08.13 15:24, schrieb Carlos Cerdán:
> ... or perhaps you can:
>
> 0. Add the new column, acording type od data and length and... save 
> and close QGIS (no data added).
> 1. Open the *.DBF table with LibreOffice Calc or MS Excel, to take 
> advantage of their functions
> 2.  Calc-Excel formulas would be taken as text, so you have to 
> overwrite them with their own results
> 3.  Save (as *.DBF).
> 4. Open the shape in QGIS. It will have the new data.
> 5. An "advanced" step 2 is add new columns directly in Calc/Excel. For 
> that, watch the headers: they have: name_of_camp , type_of_data , lenght
>
> Good luck
>
> Carlos Cerdán
>
>
>
>
> 2013/8/6 Nathan Woodrow <madmanwoo at gmail.com <mailto:madmanwoo at gmail.com>>
>
>     Hey Micheal,
>
>     This is currently not possible.  If you are running QGIS 1.9 you
>     do have the ability to define your own functions using Python
>     example here
>     https://github.com/NathanW2/qgsexpressionsplus/blob/master/functions.py however
>     if you are new to Python and QGIS this isn't something I would do
>     right away.
>
>     - Nathan
>
>
>     On Tue, Aug 6, 2013 at 9:38 PM, Michael Giebels
>     <giebels at meo-carbon.com <mailto:giebels at meo-carbon.com>> wrote:
>
>         Hello QGIS users,
>
>         the QGIS world is new to me, so please be gentle...
>
>         I am wondering how I could combine field calculator functions
>         in order to convert information from an existing data column
>         into a new one.
>         What I can do with my mediocre knowledge is to query
>         information from column 1 by setting
>
>         "column1"='abc'
>
>         which gives me a binary result (0,1) in my resulting column.
>         Then I can
>
>         replace ("newcolumn",'1','6')
>
>         How could I combine these two into one working function (i.e.
>         there MUST be a simple expression in the function list) and do
>         not lose the new number when querying another information
>         (e.g. 'cba') from column 1?
>
>         Thanks in advance!
>
>         Michael
>
>
>         _______________________________________________
>         Qgis-user mailing list
>         Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>         http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
>     _______________________________________________
>     Qgis-user mailing list
>     Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20130806/3d8e6682/attachment.html>


More information about the Qgis-user mailing list