Hot answers tagged

5

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.


4

You can easily achieve that with select by expression dialogue. "my_field" LIKE '%specific_words%' See this example


4

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


4

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


3

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 ...


2

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, ...


2

SELECT sum(st_area(st_intersection(grid.geom, affected.geom))) FROM grid, affected WHERE grid.color = 'green' and st_instersects(grid.geom, affected.geom);


1

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"


1

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 ...


1

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]%\')',


1

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.


1

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