Tag Info

Hot answers tagged

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.


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


4

I hacked this from the ESRI Building label expressions help page. The general idea here is to use .split() to split the string at the spaces and then extract the first item in that last. def convertLabel([NAME]): S = [NAME] S = S.split(" ")[0] return S


2

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


2

Provided the address field is holding string values with consistent order and formatting like "123 First Avenue" you could set the Label Expression Parser to Python and do something like this: [SiteAddress].split(' ')[0] This should split the complete address string into a list of strings by each space character in the string, and then return the very ...


1

Geoserver labels polygons,by default at the determined centroid of the polygon. You can try the Geoserver Extension PolygonAlign to allow Geoserver to try different orientations for the label to get it to fit .. GeoServer normally tries to place labels horizontally within a polygon, and gives up if the label position is busy or if the label does not fit ...


1

If you have added the labels inside of your data frame, you can turn them on and off. Here are a few ways to know if your labels are inside or outside of your data frame. If you are in Data View and you can see the labels, they are inside of your data frame. If you are in Layout View, first notice if you are working inside or outside of your data frame. ...


1

I don't know the schema of the OSM tables, but you asked for a query like this: DELETE FROM labels WHERE label_id IN ( SELECT label_id_2 FROM ( SELECT a.label_id AS label_id_1, b.label_id AS label_id_2 FROM labels AS a, labels AS b WHERE STDWithin(a.the_geom,b.the_geom, 0.001) and a.street = b.street and a.label_id != b.label_id ) ...


1

It looks like you are placing your variable labelFontSize inside a string? I would have thought this line: a.expression = '"%s" + [Name] + "%s"' % ("<BOL><FNT name='Arial' size='labelFontSize'>","</FNT></BOL>") would have been something like (I've not tested this!): a.expression = '"%s" + [Name] + "%s"' % ("<BOL><FNT ...


1

I ran a few very simple tests using some NHD data coming from an SDE connection and found very little difference between either method. 7 Label Classes in a single layer, also 7 separate symbologies: 36 seconds 7 Separate layers with definition queries, single label class in each with no query: 37 seconds A few caveats: My test was very simple with ...


1

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.


1

Although you mentioned labels, have you considered using Annotations? With these, you can simply point/click anywhere on the canvas and a marker will be set there. The drawback with this is you would have to manually type in whatever it is you wanted to label but it might be less trouble than getting all the labels in the right place. Just incase you do not ...


1

You can download the Create labeled layer plugin via: Plugins > Manage and Install Plugins... Once downloaded, run the plugin and it will ask you to provide a name for the output shapefile. Afterwards, you treat it like a point layer whereby you edit and add points to the layer. When you add a point, an options window pops up asking you to type your ...



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