Tag Info

New answers tagged

0

I have found a solution to this issue. There is a plug-in, called "Layer to labeled layer". With this plug-in I could move label without problems. It works very well.


3

You are missing a very little detail: the fact that in Python you can pull elements from a list starting at the back. The last element of a list corresponds to index -1. For example: location = "Cedar Wood Park" locationChoppped = location.split(" ") print locationChoppped[-1] would return: Park, and: location = "Highland Grove Hyper Megalopolis" ...


1

I've sort of replicated your situation. Not sure if there's an easier way to do it, but the following code snippet works for me (I'm using QGIS v.2.8). To use it, activate your layer in the ToC, open the QGIS Python console, and copy&paste the code there. lyr = iface.activeLayer() renderer = lyr.rendererV2() children = renderer.rootRule().children() ...


5

You have an option ate the Layer Labeling Settings > Rendering > Feature options > "Label every part of multi-part features" Just check that option.


3

This is python, and in your examples you're using the ampersand (&) to concatenate your string. You don't do this in the unformatted example that works. Use the plus sign - + - instead.Ampersand is used in VBScript.


2

Activate your layer in the ToC and try this in the QGIS Python console: layer = iface.activeLayer() layer.setCustomProperty("labeling", "pal") layer.setCustomProperty("labeling/enabled", "true") layer.setCustomProperty("labeling/fontFamily", "Arial") layer.setCustomProperty("labeling/fontSize", "10") layer.setCustomProperty("labeling/fieldName", "ename") ...


1

What I think you really need is to use label classes. More info is available in the help documentation at http://resources.arcgis.com/en/help/main/10.2/index.html#//00s80000000v000000 Basically though, what you would be doing is creating different classes of labels that you can label differently, just like you can classify your symbology so different ...


1

An alternative method to adding a field to your attribute table is to use the legend to show your feature count. If you symbolize your polygons by group_nameand create a legend to show these there is an option to show feature count: This will then display in your legend as: Forest (4) Park (2) etc...


0

You could add another field to your attribute table called count and for each row put the total. It's probably easiest to do manually using the select by attributes function select all "Forest" records and then calculate the count field to equal 4. Then repeating for each group_nametype Then it's pretty simple to use this field for your labels.


0

Here is some python for you. as you can tell i am lazy too. #Assumes all data is within the same database #will look for FC called SUB and compare it to FC Inspection #Will create new FC called Sub_with_Insp #should overwrite Sub_with_Insp every time import arcpy arcpy.env.workspace = r"C:\Users\whatever\test.gdb" arcpy.env.overwriteOutput = True ...


0

I am going to give you a slight python alternative to the other answer. I am not going to write out the whole thing, but if you are familiar with arcpy, you should be able to fill in the gaps. First things first. Select those Subdivision features that contain and inspection point. arcpy.SelectLayerByLocation_management("SUBDIVISION", "CONTAINS", ...


2

You could also add a text field to your subdivision layer, HasInspection. Calculate the values in that field to Y or N based on whether it has an inspection point. Then set up a label class that only labels subdivisions where HasInspection = Y. Once you do this, you'll only have to run the field calculation periodically (or do the update in the new ...


2

This is what I would do. First I would use the selection tool to select all of the polygons that contain a point Selection→select by location→selct from "subdivion" Source layer "inspection"→ contain the source layer feature I would then right click on the subdivisions class and create a layer from selected features you now have a layer of subdivisions ...


0

Depending on how many features you have to label, you could try converting your labels to annotation, and move them to the exact position you need for each feature. Good Luck!


0

Try using southeast orientation and checking the offset option to 'measure offset from exact symbol outline'.


0

I contacted the plugin developer, and everything's much clearer now. I thought I would share what I learned, hoping it could be useful to someone else. Once you have generated a new layer in Plugins -> Easy Custom Labeling -> Generates a layer... (see @gcarillo 's answer), leader lines should appear automatically when you use the Move label button in the ...


0

Using QGIS 2.0.1, you can use an expression directly in the labelling tab in order to get what you need : CASE WHEN $id%5 =0 THEN "yourfield" END in other words, if your id value ($id is built in) is divided by 5, then label with the value in "yourfield"


3

You should be able to use the Year function directly in your label expression: [Diameter] & " " & [Material] & " Installed: " & Year([InstallDate])


1

Here is one way of doing it: Add an integer field 'InstallYear' to the attribute table. Use the Field Calculator on the new 'InstallYear' column, then enter this: InstallYear = year([InstallDate]) From here you can simply change your label expression to: [Diameter] & """ & [Material] & " " & "Installed: " & [InstallYear] ...


4

There's a plugin called Leaflet.label which does what you want: https://github.com/Leaflet/Leaflet.label


1

When you export to PDF, on the second tab of the "Options" you will see a box that will most likely be unchecked: "Embed All Document Fonts" Make sure that it is checked and it should reduce those errors for the people viewing your PDFs. If you yourself are seeing those errors, then something else is going haywire because those fonts should already be ...


2

One solution: create a new column of type integer. Using field calculator, assign the value using the $rownumber variable. Then, enter the following logic into the "Show label" option in rendering parameters of the label dialog: [new column name] % 5 = 0 The % is the modulo operator - it represents the remainder of the first number after dividing by the ...


1

Quick Solution: In layer properties dialog for this layer you can set the general label rotation (layer properties > labels > placement). If the number for the map rotation in print composer is 30 (it rotates clockwise), then the number for the label rotation is 30 (it rotates counter clockwise). Does it work with your layout?


1

Don't think this is possible as of yet. A workaround could be to: Create a copy of your layer Edit the symbology of the copied layer to make the features transparent (ie. no visualisation) Add layers to the copied layer and edit the placement options so that it doesn't overlap the labels from the original layer. Hope this helps and hopefully others can ...



Top 50 recent answers are included