Hot answers tagged query
Just figured it out. In the layer properties, go to the "Labels" tab, and set the Method to "Define classes of features and label each class differently". I set two different classes ("Default" and "2"), each with a different style and scale range. the label now changes its style according to scale range.
You can easily achieve that with select by expression dialogue. "my_field" LIKE '%specific_words%' See this example
For a File Geodatabases you could use - SUBSTRING(REGION FROM 1 FOR 3) = SUBSTRING(REG FROM 1 FOR 3) For a Shapefile use: SUBSTRING(REGION, 1, 3) = SUBSTRING(REG, 1, 3) I got the shapefile syntax from this Technical Article - HowTo: Compare a field with a substring in another field
You can use the regexp_match function to match the first number inside your CASE statements: CASE WHEN regexp_match("nombre", '^[0-3].*') THEN 'ROSETAS' WHEN regexp_match("nombre", '^[4-5].*') THEN 'CTO' ELSE 'OTRAS' END
you can also use strpos( "myField", 'awesome') > 0 and for case insensitive searches strpos( lower("myField"), 'awesome') > 0 this is slightly more error-prone as you need to put double quotes around field names and single quotes around string values. I always fall into that trap. I noticed that a recent version of QGIS (2.12?) has quietly ...
Similar to what Zoltan has said, but you want to group by the color, which will then get you the sums for each color. SELECT sum(ST_Area(ST_Intersection(grid.geom, affected.geom))), grid.color FROM grid, affected WHERE ST_Intersects(grid.geom, affected.geom) GROUP BY grid.color; The final WHERE ST_Intersects(...) will not affect the answer, ...
SELECT sum(st_area(st_intersection(grid.geom, affected.geom))) FROM grid, affected WHERE grid.color = 'green' and st_instersects(grid.geom, affected.geom);
There are two views that you need to check geometry_columns and geography_columns that will provide you with a list like: "ian";"public";"coastline";"geom";2;27700;"MULTILINESTRING" "ian";"public";"motorway";"geom";2;27700;"MULTILINESTRING"
Yes it's possible to do this in python. Check out the documentation on the Make Query Layer tool http://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-query-layer.htm You can also use the make query table tool (http://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-query-table.htm); if you specify a shape field the query table ...
The only change you should need to make to your original Flex where clause is to escape the single quotes around the value using the slash character: expression: 'upper(ICAOcode) LIKE upper(\'%[value]%\')',
If you select "table_1" for the Update existing field option, try using this expression: if( "table_2" = 'test', 'y', "table_1") Basically, you're using an IF THEN ELSE statement.
I am posting this just so you can mark this format as the answer. The IN syntax is the most compact way to write the expression you want: [OU] IN ('001', '002') AND [Formation] = 'Residuum'
Only top voted, non community-wiki answers of a minimum length are eligible