Tag Info

New answers tagged

0

I think the definition query would be faster because it's at the object level and not at the attribute data level. You would still have to test. However I would use definition queries and not label classes.


0

The arcpy.mapping API only provides access to a limited number of layer properties that can be directly modified but all properties found in the Layer Properties dialog box can be modified using the UpdateLayer function. The information is extracted from a source layer and applied to the layer in a map document that needs to be updated. The ...


1

Assuming the SQL queries on the label classes are the same as the ones on split out layers, the single layer approach with multiple label classes will be faster. Why? Labeling in ArcMap will execute one query for the layer draw and then one query for each label class. So a layer with 4 label classes will query once for all features drawn and then 4 ...


2

Here's an expression that should work: case when "Point_Number" % 7 = 0 then "Point_Number" end


4

I suggest another way to solve your problem. In the "Expression dialog" of the "layer labeling setting" use this expression: CASE WHEN tostring( "Point_No" ) LIKE '%5' THEN "Point_No" END


5

I'd label the entire layer using whichever field you'd like. Then, in the Labels -> Rendering tab, look for the "Show label" control. Click that button and select "Edit". Enter an expression along the lines of: right( "Point_No", 1 ) = 5 This should only display labels for features where Point_No ends with a 5.


5

as your values [abstract] and [TX_sect] are number, you should return them as string using str([abstract]) Secondly, "None" will be a string, not the null value. You must test it with [field] is None Finally, your condition should be written in parenthesis : if ([TX_SECT] is None and not([ABSTRACT] is None)):


0

The layer you are trying to label must have at least one attribute field populated with data. You can then turn on labelling in Layer Properties and select which attribute field to use for your labels. Have a look here as well: http://docs.qgis.org/2.2/en/docs/training_manual/vector_classification/label_tool.html


1

Try this code instead which I think will work because I tested it. I suspect: lblclass.expression = " [OBJECTID]" should be: lblclass.expression = "[OBJECTID]" I also changed lblclass to lblClass in two places and used some more print statements while I was debugging. import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") for lyr in ...


0

Figured it out through VBScript. Will research how to do this in Python now that I have working template... Function FindLabel ( [gis.GIS.Transformer.GlobalID], [gis.GIS.Transformer.FACILITYID] , [gis.GIS.Transformer.RatedKVA]) Dim objConnection, objRecordset, strSearchCriteria Const adOpenStatic = 3 Const adLockOptimistic = 3 ' Connection string for SQL ...


2

I know this is an old topic, but I achieved this by using CASE as an expression based label eg CASE WHEN $scale < 4000 THEN "Neighbourhood" ELSE "Town" END


1

Actually, since you know all your measures always end in +00, because that applies to all intervals of 500, you can simplify the expression to: esri__measure / 100 & "+00" You only need the more complex expression in my earlier post when your hatch intervals divided by 100 are not integer values. That would apply if the last measure was shown whether ...


2

You missed an underscore in the esri__measure variable in your first 2 if clauses, so they always tested as equal to 0 and fullfilled the condition of the first clause (an uninitialized variable esri_measure will equal 0 while esri__measure is not 0). So in reality no measures were being tested in any of your clauses, just a bad variable that was always 0. ...


2

Well, first of all I think Joseph's answer is very helpful but do not meet all of your hopes. You wrote in your question: I hope to create three layers, one for each group, all pointing to the same .csv file. So this is the way you can do that: Add your csv data to QGIS 3 times - Rename each layer according to GROUP Set appropriate filter to your ...


2

It looks like you're using Windows. You should try \r\n instead of just \n. I'm currently not in a position to check if this would work, so if that doesn't work, please leave a comment below and I will delete this answer.


2

Strange, works for me just fine. Here is my attributes table: And I applied this to layer Properties > Labels > Formatting And I get this: Are you clicking the button next to "Label this layer with" to include your filter?


2

Hopefully I understood your question, in which case you can do the following: Layer Properties > Style Select Rule-based, double-click on a rule to bring up more options. Taking orange as an example, use this command: "Name" = 'Orange' Click 'OK' and add more rules and repeat the same steps as above. You would only need to change 'Orange' Once ...


6

The syntax is almost correct (see the note in the end), but you might be using it in the wrong place. The correct way of doing it is like this. Label your layer using your "Column Y" field, in the example below that's field "codigo". go to the "text" sub-menu, color and click the data defined button; There choose the edit... option below Expression; ...



Top 50 recent answers are included