2
votes
1answer
43 views

QGIS: Expression WHEN property1 = 'FOO' THEN property2 = 'BAR'

Our Foundation is adding additional properties to points. If property1 = FOO , then add property2 = BAR WHEN property1 = 'FOO' THEN property2 = 'BAR' END When I run this the ...
0
votes
2answers
50 views

Using the Rule-based style to calculate each grid cell from overlaps

I am using the Rule-based styling properties (QGIS 2.2) to determine the colour of grid cells for a merged shapefile. Each grid cell defined by its ID may be overlapped by several layers as defined by ...
2
votes
1answer
67 views

Calculating the average / MEAN of an attribute field in a QGIS model

I need to know how to calculate the average / mean of an attribute field in my point shape file. Is this possible to do with the field calculator? I just found the options min or max but not mean. The ...
1
vote
2answers
74 views

How to compute percent of a field

I have a layer with a column conaining population values. I want to write an expression to compute in a new field the percentage of population each polygon has in relation to the total population. I ...
3
votes
1answer
99 views

QGIS - Is it possible to increase Output Field Name?

When creating a new Column, the default value for the length of the name is 10. Using the Field Calculator via the Model Builder, I want to include the names of regional areas into the columns which ...
0
votes
1answer
84 views

Auto increment a new column using Model Builder Field Calculator in QGIS?

I am making a model which requires creating a grid and clipping various layers to it. Using the Create grid function does not provide an ID column, instead it creates 2 columns: "longitude" and ...
2
votes
1answer
97 views

How do I add a column in an attribute table using QGIS graphical modeler?

I have started to make a model in QGIS 2.2 graphical modeler. I have made a buffer around a polyline and used it to clip a polygon layer. So far i t works. But the next step is to add a new column ...
0
votes
1answer
68 views

QGIS: graphical-modeler to calculate area of polygons

I'm trying to calculate the area of polygons using the field-calculator in QGIS (2.0.1). If I do this manualy it works fine, but if I do this using the graphical-modeler I get NULL as area for every ...
0
votes
1answer
34 views

How to use QGIS field calculator to delete style code?

I am struggling with following issue: How to delete style code before id codes x.x.xx.. and the }s in the end? Examples below. Any help appreciated! {\fArial|b1|i0|c0|p34;A.B.11} ...
2
votes
2answers
142 views

Convert from Julian Date to Calender Date in Field Calculator

Does anyone know of a way to convert from a Julian date to a regular calender date in either QGIS or ArcGIS field calculator? Thanks...
0
votes
0answers
31 views

Calculating rows in a attribute table of a point shape with QGis or Saga

I have a point shape with an attribut ("test"). I need to calculate the sum of the 1st four (id 1-4) "test" values and then the next 4 (id 5-8). Is there a chance to calculate this with the field ...
2
votes
2answers
65 views

What's the use of the buffer function in field calculator?

I'm trying to find out how the buffer command in the filed calculator works. I tried to create a new field to my point shapefile (integer) with the following: buffer ($geometry, 100) but no ...
0
votes
0answers
15 views

Can a joined-layer have its attribute changed depending on what layers are selected/deselected?

Using QGIS, I have a polygon-grid layer which covers everything, Layer_All joined with 2 other grid layers: Layer_1 and Layer_2, both of which intersect at various points. I would like Layer_All to ...
3
votes
1answer
62 views

How do I add a field to a table using the QGIS graphic modeler?

I was wondering if anyone could help as I'm struggling to get anything out of the QGIS graphic modeler. For info I have no programming skills whatsoever. I need to be able to add a new field to an ...
1
vote
1answer
34 views

Expression to create and populate column based on filtered fields

I wanted to create a column and populate it with data based on data from other fields. If column_1 contains fields which has similar string (eg. field_1 = "Country: UK", field_2 = "Country: US", ...
1
vote
1answer
48 views

Create and immediately update field using Field Calculator

You can create fields and once created, populate them with data using the Field Calculator. But can you do both at the same time using an expression? Or must you do it in 2 steps?
2
votes
0answers
47 views

Using Field Calculator to Convert Data Type In Field

I am trying to convert a field that is listed as "String" because it was imported into QGIS as a CSV (rural poverty population percentages by county in NC). I need to convert the percentages field ...
0
votes
1answer
28 views

Wich is the way to create serial field following alphabetical order with QGIS?

I have a field with names, a string field, and I want to create another one with serial content following the alphabetical order. I have this: -------- |Field1| -------- | B | -------- | C ...
3
votes
3answers
86 views

Field calculator problem

I have an issue withe the field calculator. It is impossible for me to multiplicate 2 columns (area * KZ). The result is always "0". I used the formula area * KZ....is this the right formula? LINK to ...
8
votes
5answers
303 views

Print out the properties of the attribute table in qgis?

I have to merge a lot of shapefiles into one great shapefile. So I want to compare the properties of the attribute tables to see if there are differences between the tableproperties of each shape ...
0
votes
1answer
55 views

Can QGIS report/calculate areas/perimeters of individual polygon components within multipart shapefile?

Can QGIS report/calculate the areas/perimeters of individual polygon components within a multipart shapefile without using the "explode" vector tool to generate a new file? using QGIS 2.2.0 on ...
3
votes
1answer
426 views

Syntax of conditional statements in QGIS Field Calculator(s)

I have a shapefile which I need to modify. There is one column "CLASS" with the attributes: "A", "B" and "C". I need to change "A" into "1!, "B" into "2" and "C" into "3". I tried it with case when ...
0
votes
0answers
62 views

Field Calculator: Error message

Field Calculator: using the x- or yat or (0 "or-1" ) expression, I keep receiving an error: An error occurred while evaluating the calculation string: Index is out of range. I have shut down and ...
2
votes
0answers
28 views

How to save complex expressions in QGIS Field Calculator? [duplicate]

I have been debugging some long case expressions in the field calculator and getting frustrated because I have to remember to copy the expression before I test it otherwise I end up having to reenter ...
3
votes
1answer
60 views

Do pad functions of QGIS Field Calculator have bug?

I have this expression in the field calculator: regexp_replace('1', '^(\\d+)', rpad('\\1', 3, '0') ) gives 01 rather than 001 as expected. the *pad functions work fine when called outside ...
1
vote
2answers
68 views

How can I do more flexible matching in conditional expressions than provided by LIKE?

With LIKE '%' works but I have had no luck with character ranges, i.e. [0-9] to match a digit. Oh for a regular expression ;)
2
votes
2answers
120 views

Expression to calculate and sort data from several layers into one layer

I am trying to develop an expression whereby one layer can add data from 2 other layers and then rank them, is this possible? I have also tried the problem with using just 1 layer but I cannot work ...
1
vote
1answer
48 views

Use field calculator in QGIS so get number of points in polygone and store it in attribute table

I have to layers, one point one polygon (with 6 areas) stored as shapefiles. Now I want to count the number of points in each area and write it into the attribute table of the polygons. A column ...
3
votes
1answer
92 views

Field calculator uses wrong fields when working with joined data

I am having an issue in qgis table joins. i have a joined a csv file to a sqlite database and common id is used for join. the join is displays correctly in attribute table. the attributes in sqlite ...
0
votes
0answers
97 views

New values created with QGIS field calculator become null upon saving

I'm having a problem with QGIS. I'm trying to create a new column in the attribute table for a shapefile. The numbers in the fourth column (see screenshots) are currently strings, so I want to convert ...
1
vote
2answers
159 views

How to add a new column in attribute table with attribute with indexes of another max-min ordered attribute field?

I've an attribute column named e.g. VALUE with different values I would like to make a column named e.g. ORDERsuch that the greatest value has the attribute 1 the second value 2 etc. etc. so order ...
1
vote
1answer
59 views

Mismatch in area calculation using Field Calculator vs Group Stats in QGIS 2.0

I have two polygon files (A being my area of interest and B being a categorised land cover layer). Both layers were in the same projection (projected and not geographic). Using QGIS 2.0, I used the ...
0
votes
0answers
14 views

Unique referencing based on Co-ordinates

I have a list of 400 nodes, all split across 'maps' which are gridlines 1000x1000m. Each grid area is referenced by the first 3 digits of the X value of the centre and first 3 digits of the Y value ...
3
votes
1answer
180 views

Can't compute area of shapefile in field calculator

This shapefile represents the counties of NM. I am trying to compute the area of each polygon (yes, I know there is an area field, but this is a simpler example of a problem I'm having which doesn't ...
0
votes
1answer
128 views

Field Calculator - replace string function - data value recognised as a column and is “not found” [closed]

I have the same challenge as GrahamD - Field Calculator - replace string function I have exactly the same challenge. Exactly the same as GrahamD's challenge, p abbreviated for pan. Type_2 as a test ...
0
votes
2answers
175 views

Field Calculator - replace string function

Within an attribute table I'm trying to replace one string with another using the 'replace' function . As an example, there are a number of features whose field 'NAME' contain the string '(B)' and ...
4
votes
2answers
78 views

How to replicate trunc function on QGIS?

I've search a bit before asking this question, but I haven't found the answer. Is there a Trunc function on QGis? I've tried using floor, but it doesn't work (like I want) if the number is negative, ...
1
vote
1answer
131 views

Is there a way to automatically calculate attribute values for new features?

I am creating a vector point layer which will be added to over time. I have been using the field calculator to populate fields such as X and Y coordinates. I'm wondering if there is a way to have ...
0
votes
1answer
96 views

Is it possible to calculate a value based on values of another row?

I have a point shape file in qgis. For one of the attributes, I would like to offset the values, i.e. the value for point 1 goes to point 10, the value for point 2 goes to point 11 and so on. I see ...
0
votes
0answers
159 views

Select Expression and Field Calculator in ONE STEP with QGIS

I have an Open Street Map Shapefile and i want to use Field Calculator to add information to a field called a800900 according to the field TYPE of street, by different area (field called ID_2). The ...
4
votes
1answer
362 views

How to use the Intersects function in the Field Calculator of QGIS?

I would like to have an example on how to use the Intersects function in the Field Calculator of QGIS. Basically, I want to know which feature from a polylines layer intersects a polygons layer and ...
0
votes
0answers
92 views

Doubt in Field Calculator

I am working in an project.I have a point Shapefile its projection is NAD83(HARN)Pennslyvaniasouth(ftUS)*EPSG3365* when I measure its distance(between two points) it gives me the answer in feet .yes ...
1
vote
1answer
169 views

Field Calculator returning incorrect length and area values

I can get accurate lengths of line features and areas of polygon features using the "Measuring Tool" in a QGIS project. However, when I attempt to generate length or area data in Attribute Tables ...
0
votes
0answers
48 views

Ádvance Python Field Calculator - Global Expressions [duplicate]

I am trying to create a global expression that populates a new field based upon existing values in an attribute table. I am using QGIS Dufour and the Sextante toolbox, and the "Advanced Python Field ...
1
vote
1answer
112 views

Why do area measurements from “measure area” tool and field calculator differ?

My problem is when using the "measure Area" tool on the toolbar I get the correct value but when using the field calculator in the Layer Attributes the area is very different including -ve areas. ...
4
votes
1answer
81 views

Area calculation of an object without coordinates

I have a photo of an object with a scale and I want to calculate its area. I guess I have to create a polygon of the area to be calculated to use the 'field calculator'. But how do I tell the program ...
0
votes
0answers
51 views

Problem with field calculator

New to QGIS and suspect I'm missing something basic but.... When I input the formula to create a new field, all the calculations are correct but when I press the "Save Edits" button, all the figures ...
2
votes
1answer
78 views

Extract characters inside parentheses in QGIS

I have a shapefile of the buildings on my college campus. It has a "name" field that includes the name of the building and then in parentheses the building's campus address (i.e. Health and ...
1
vote
1answer
87 views

How to perform intersect operations in the Field Calculator in QGIS?

How to use the Intersect function? How would I specify to REPLACE layer1.field1 with layer2.field2 WHEN layer1.geometry INTERSECTS layer2.geometry Is that feasible in QGIS?
2
votes
1answer
131 views

Batch Update Fields in Field Calculator or Model

I have a dataset of block-level census data that I clipped to an Illinois State Senate district. To update the data (e.g. for population) I'm applying an area multiplier, i.e taking the area of each ...