Tag Info

Hot answers tagged

8

You can use QGIS' quadrant placement specifier determined from the line's azimuth to place a better label. The quadrant specifies 8 positions around a point: [ 0=Above Left | 1=Above | 2=Above Right | 3=Left | 4=Over | 5=Right | 6=Below Left | 7=Below | 8=Below Right ] Here's an example around Null Island, creating a table and two views. ...


7

One way of doing this is cloning the layer, using definition queries and labelling them separately, using upper-left only label position for the first layer and lower-left for second. Add THEFIELD type integer to layer and populate it using expression below: aList=[] def FirstOrOthers(shp): global aList key='%s%s' ...


4

As far as I know there is no such tool. The work-around is to either split the polygon into multiple polygons or create a point layer for label placement. The spatial join approach you've posted has to be slow since it does not take advantage of any spatial index thus looping through all features every time.


3

Below is a partial solution, I'm sure some whizzy person can step in and finish this? This goes into the Advance label expression. Its not very efficient hence me asking about the number of points in your dataset. So for each row that gets labeled it builds 2 dictionaries d where the key is the XY and the value is the text and d2 which is the objectID and ...


3

You can force all labels to display by changing the placement properties. Go to layer properties > Labels Tab > Placement Properties > Conflict Detection and tick on Place overlapping labels It will look a mess when you zoom out but then you get all labels.


3

You need to set a definition query (see link in @PolyGeo's answer) to show only the selected features that you wanted labeled. This can be done through the definition query tab in properties or through the labelling options called label classes (note - see @ChrisW comments below). I use these solution quite regularly and find them easy to do.


3

The Symbology tab of the Layer Properties does not perform any selections. If you want the same features to not be labelled, I recommend that you apply a Definition Query instead: When you specify a dataset that you want to draw as a map layer, you often only want to draw some of the features in the dataset. In these situations, you can define a ...


2

This works for me and I have labeling only with 2nd word: So maybe you have few atributres without " ", and you get "out of index". def label([SSA_NAME]): x = [SSA_NAME] x1 = x.split(" ") if len(x1)>1: return x1[0] + " " + x1[1] else: return x1[0]


2

I have solved the problem! When you go to your print composer, you add a new map as you normally would. Leave enough space for your zoomed in portion to be displayed. Add a new, smaller map in the area where you want your zoomed in portion to be displayed. Within this window, zoom to whatever area you want. In the "Item Properties" tab, scroll down to ...


2

Python has a similar replace method you can use: def FindLabel ([NUMBERNAME], [NUMBER], [BLOCK], [SURNUM]): lineone = "A:" + [NUMBER] numName = [NUMBERNAME].replace("&", "&amp;") absName = "<CLR red='255'><FNT size = '14'>" + numName + "</FNT></CLR>" if [NUMBERNAME] is not None: return ...


2

The code that works for this problem is: def FindLabel ([Name]): if [Name] not in ['NONE','N/A']: return [Name]


1

I feel your question is poorly titled. Your features are labeled but you are concerned that at certain scales the labels are suppressed. The common way that this is acheived (to prevent clutter like @Hornbydd says) is by setting minimum and maximum scales at which those labels are displayed:


1

No, In fact arc map uses map units or page units for label offsets so this distance is not related to projection anyway. As ESRI says "These units are measured in map units or in page units (millimeters, inches, or points)." So there is no matter if the layer is in GCS or PCS. Details are at here and here.


1

Could you use the Easy Custom Label plugin and and draw an empty label with an SVG background for this? So; Give the difficult features their own layer. Install the plugin and create an easy label layer with it Make the label blank i.e. ' ' On background choose draw background , choose SVG and the appropriate SVG symbol (Note: I had to change the ...


1

You need to write an expression in the label tool, to make only your desired values visible. Double-click the layer properties and select the label tab. Locate the "Expression" button and select it. Now you have to write the expression that will visualize only the desired values. You can choose between VBScript, Python, Jscript. You will need to check ...


1

Try: newString = string.replace("&", "&amp;") Where string is your field with ampersand.


1

Double click your layer in QGIS, find the Label menu, label your layer.


1

I would comment, but it's not letting me. You should check into the Maplex Label Engine, it's very customizable and might have the solution you are looking for.


1

I will try to be as clear as possible, but I am not sure I understood everything that your are asking. You might want to edit your post with additional information or a concrete example and the version of Geoserver you are using. Problem 1: you have duplicate labels due to the tiling of your WMS request by OL -> solution: in Open Layer, request a single ...


1

Update: I found the solution in the following link under "Extract a number." Be sure to select "advanced" in the label expression dialog. http://support.esri.com/en/knowledgebase/techarticles/detail/20154


1

okay.. as it's in map units this should be fairly straight-forward, within limitations. You already know the height of the label. If it was in points it would be scale-dependant. This assumes a fixed label size, so how well this works depends on how uniform your labels are, and whether or not you use a proportional or fixed-width font (fixed width is easier ...


1

All I had to do was set the precision to match the width of my decimal number fields.


1

Since I was not able to realize the rotation I did the following to achieve a comparable solution: I just switched the line direction (How can I switch line direction in QGIS?). This rotated the labels by 180°.


1

For QGIS 2.8.2, it works fine. You can turn the labels upside-down: To rotate labels by 180 degrees (or turn them upside-down), from the Rendering tab you can enable the option the Show upside-down labels option which would automatically rotate the labels. You don't need to define a value for 180 degrees: Then that should do it. Remember that 6 and 9 ...


1

As far as I remember, the rotation can only take effect if you also data-define the coordinates. Otherwise, labeling just follows the position defined in the placement section and ignores the data-defined settings.


1

To exclude some of the arrows of labels that have been moved with the tool you can manipulate label's layer. I first selected all the labels with arrows that should not have arrows and then used the Field Calculator to add a new column in the attribute table. In this column I put a "1" for the selected labels. For the labels that were not moved or should ...


1

Not sure I completely understand but I noticed there's a couple of attributes in the custom label layer called LblShow and LblAShow, both of which use Boolean values (0 for false; 1 for true): The LblShow is the actual label so we can leave that with an attribute of 1. The LblAShow is the arrow (although in my view, it's practically tiny). If we update ...


1

If this is a set of styles that you apply as part of a routine workflow, it might be worth setting up a QML style file that can be applied to any workspace of the same type. If the styling of elements is thematic (and you know what columns drive the theme) you can build a QML file programmatically straight out of PostgreSQL (assuming you have your data in ...



Only top voted, non community-wiki answers of a minimum length are eligible