The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [expression]

Expressions are SQL-like statements that are used to evaluate dynamic properties.

Filter by
Sorted by
Tagged with
-1
votes
1answer
120 views

Where Clause looking at two Columns and a RANGE Expression

Using ArcPy I'm Trying to Set up a Where Clause with a RANGE in my "FeatureClassToFeatureClass_conversion" This {Where Clause} needs to Query Two Columns in the data: FEATURE = 'ENVIRONMENT' and ...
1
vote
0answers
105 views

Data dependent override on colour and linewidth of line pattern fill not working after upgrade to QGIS 2.12

I have recently upgraded to QGIS 2.12 which has resulted in a problem with one of my projects, whereby the data dependent override of the line width and colour of a line pattern fill and SVG marker ...
1
vote
0answers
46 views

How would I build the syntax inside a request in the case I wanted to multiply 2 variables?

I would like add something to my previous question (here: How to build QgsExpressions in python?) How would I build the syntax inside this request in the case I wanted field_name to be also a ...
7
votes
2answers
2k views

How to build QgsExpressions in python?

How can I build a feature request expression using variable inside expression? For example values = [1, 2, 3] for j in range( y ): it = vl.getFeatures( QgsFeatureRequest().setFilterExpression ( u'"...
1
vote
1answer
564 views

Distance Measure using QGIS Field Calculator?

A QGIS newbie who can't for the life of them work out the expression needed to represent distance from a point. I want to show how a walkable a neighbourhood is. I need do to this by showing what ...
3
votes
2answers
2k views

Handling NULL values in labeling? [duplicate]

In QGIS (2.10.1 on a Mac), I am trying to make some multiline labels on a map I have with a bunch of trees in them. In the attribute table I have columns with the Latin scientific name, the English ...
1
vote
1answer
96 views

QGIS Labeling OSM items depending on scale

I'm working with OSM data in QGIS 2.10 (Ubuntu). I'd like to label items depending on scale. What I mean to do is to have only labels of "primary" roads from a scale of 1:80.000 down to 1:50:000 all ...
13
votes
3answers
3k views

How to set transparency per polygon in a shapefile in QGIS?

How to set transparency per polygon in a shapefile in QGIS? For example: a polygon with field "value" = 1 should be fully transparent whereas field with field "value" = 0.4 should have a 40% ...
5
votes
2answers
939 views

QGIS atlas, add picture with path from attribute

I love working with the atlas generator and I came up with a new case to use it for. I want to add a picture to my map from URL. I am allowed to add a picture if I type in the full url path. eg. http:/...
1
vote
1answer
662 views

Only displaying polygons over certain size in ArcMap using Definition Query?

I have a polygon containing lots of bodies of water and only want to display the bodies of water over a certain size. Can I do this using a definition query?
3
votes
1answer
759 views

How do you label only the odd or even integers of a field using python in the label expression in arcmap?

I'm new to python and would like to use the label expression box with python to display only the odd or even integers from the field, [Frame_Number]. I was thinking something like def FindLabel ( [...
2
votes
0answers
83 views

CalcInterior expression help in QGIS

In QGIS on a new layer I'm trying to calculate the area of certain landtypes individually from a Grounds Maintenance layer. Previously I have used the following expression in Cadcorp SIS: ...
2
votes
2answers
53 views

Colouring three individual attributes in point layer using QGIS?

I am new to QGIS and am learning the expressions function. I would like to know how to independently colour three separate attributes on a point layer as below:
3
votes
3answers
327 views

Show all points (airports) in featured country only

I need to generate maps showing all airports located in a featured country. My airport shapefile has over 8000 points, so I need to remove those that are irrelevant. Example: When Sweden is featured, ...
3
votes
2answers
10k views

QGIS Multiple CASE WHEN/THEN Statements for Expression Based Labels

I am trying to label a single point with multiple labels, based on the attributes for that point. For example, if one of the attributes is equal to 1, I want to label it with a specific text string; ...
1
vote
0answers
70 views

Text box with automated coordinate reference system in use on Qgis

Using an expression, is it possible to automatically fill a text box placed on the map (in the composer) showing the reference coordinate system of the project? If possible, how would that expression ...
0
votes
1answer
312 views

How to use SpatialOperator in filter expression in QGIS

In a python script I want to specify a request filter expression using a spatial operator. I am following the general syntax "field name" operator condition. For example: setFilterExpression('$...
0
votes
1answer
1k views

Check that a Variable is NOT Equal to Multiple Values

I am trying to use a check a field against several values (eg: [Name] != 'NONE', and [Name] != 'N/A'). This is for the label expression builder within ArcGIS and I am using it eliminate label for ...
1
vote
0answers
420 views

How to define a custom function that returns value of a field in an unsaved form

Filter expression builder in QGIS 2.8 allows us to define custom functions using python. I'm intrested would it be possible to define a function which returns a value of a field in an unsaved form ...
2
votes
2answers
975 views

Limiting available values in dropdown field of QGIS form according to value selected in previous field?

I'm building a rather complex entry form for a layer stored in a PostGIS database. I am following this usage scenario: On several occasions I have dropdown fields which lets the user select a type of ...
2
votes
2answers
512 views

Using label expression to label highway with last group of numbers in field

I'm using Tiger road files and I want to label the highways with their shield number. Tiger has an inconsistent naming convention for road features; I am specifically concerned with the highways. I ...
15
votes
2answers
16k views

How to select features containing specific text string using an expression in QGIS

I need to style a survey parcel polygon shapefile, based on whether the polygon is a mineral claim or not. Unfortunately, the only information on whether a polygon is a mineral claim or not is ...
4
votes
2answers
1k views

Getting currentfeature's color in Expression Builder of QGIS?

In QGIS Expression builder. I want to obtain the color code of the current feature. I mean: My layer contains lines, each one is painted with a different color. Now I want to assign that color to ...
2
votes
0answers
262 views

QGIS 2.8.2 - Using spatial expressions in labelling

I'm creating some hard copy map output from QGIS. I want to use an expression to suppress labels for some features on a layer when another feature from another layer intersects with those features. ...
1
vote
1answer
726 views

Calculate Field and Python Expression

i know to you my question sounds ridicoulus ... but i ask anyway ;-) i want to populate a field with a new value. If the field has a value of 1 it should get the new value of 15. If the field is 0 ...
4
votes
3answers
11k views

If-Then Label Expression

I'm trying to create a VB label expression on streets such that streets with an alternate name (ACS_ALIAS) will be labeled with the LABEL name and the alternate name in parentheses; streets with no ...
1
vote
0answers
157 views

Masking Labeles in the Compositor in QGIS 2.8.1

I am looking for a way to remove/mask out Labels that are under a composer Element (Overview Map), which I moved in front of my main map. Is there no way to do this? Maybe using the ItemID? I tried ...
3
votes
2answers
303 views

Select by expression functions in QGIS 2.8.2 (Windows)?

Please forgive me if this is obvious, but having opened a newly installed version of QGIS on Windows, I can't seem to see the list of functions normally present (as shown in the Mac image) in the '...
2
votes
1answer
183 views

Labelling expression - How to combine two different functions?

I'm not an expert of scripting and programming, I need to use these two functions in the labelling expression in ArcGIS. How can I combine this: Function FindLabel ( [toponimo] , [testo] ) ...
2
votes
2answers
2k views

How can QGIS Field Calculator sum values from a spatially joined table?

Can the Field Calculater be used to sum values from a related table via a Spatial Join? I have two vector polygon layers A and B, each with a numerical column VALUES. I want to update VALUES in ...
2
votes
2answers
2k views

How can I get features that satisfy a QgsExpression using PyQGIS?

I have two fields say "State" and "name" which would be get from the two comboboxes. After which, based on the current text in the combo box, I want to make QgsExpression and feature that satisfies ...
0
votes
1answer
100 views

Problem with addιtion abstraction in Field Calculator

I want a bit analytical respond for the mistakes I have done in my code cause I am new to programming. I am using ArcGis 10.2. and I must process a field with distances in an attribute table I have. ...
2
votes
1answer
302 views

New filter expression QGIS 2.8

I try the new filter expression with QGIS 2.8. I want to filter only the selected objects on a layer in my map. My expression is: import processing from qgis.core import * vlayer = processing....
3
votes
3answers
3k views

Using 'max()' in expression with QGIS?

I want to make a rule-based style on the maximum value from a field. I set my expression like: max("fieldname") It returns every value instead of only the maximum one. Can anyone tell me the right ...
3
votes
2answers
13k views

Using QGIS to Select by Expression?

A basic QGIS 2.2.0-Valmiera, Select By Expression - Field Calculator question. Introduction I am a geologist searching through a geological database (see attached figure). I have a shapefile and ...
2
votes
1answer
141 views

QGIS 2.2 expression string builder removes brackets

in QGIS 2.0.1 is used to calculate minimum building distances (Abstandsflächen in German) with an ellipse marker with data definded properties. the expression for this is quite complex: (([Value 1] +...
20
votes
3answers
19k views

Learning to use expressions in QGIS?

Is there any resource recommendations in general for getting past the basics of QGIS and going into the deep dark secrets? Specifically in relation to expression coding for labeling, queries, etc.
2
votes
2answers
3k views

How to convert decimal point to comma in QGIS?

I am working with data in Colombia where decimal points are written as commas. I would love to create a new column in QGIS that would convert all decimal points (periods) to commas for the purpose of ...
4
votes
1answer
628 views

How to write EXPRESSION for main contours in Mapfile?

I'm working with mapfile. I defined new layer "contours" and I want to render with maxscale = 100000 and minscale = 50000 contours with value distance of 50. That means that I want in that scale ...