filter to label countries only (and not all their islands)

Home Forums Natural Earth Map Data Cultural Vectors filter to label countries only (and not all their islands)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4396

    Nathaniel
    Keymaster

    If you have one of the newer QGIS, there is a new labeling tool in the toolbar with ABC at an angle over a blue line. Click that while your target layer is selected. This labeling engine is a lot smarter than the basic one available in the layer properties label tab.

    You can also download the “scale rank” version of the countries file which has some of what you’re looking for. Or just label using the 50m version of countries. You want to label based on the label rank or the scale rank.

    And make sure you’re not labeling all parts of a multipart feature.

    #4397

    topoman
    Participant

    I’m impressed by how quick you answered!

    Using this new labeling tool does indeed solve basically the problem!

    I would like to prevent the names on some islands to appear (some instance Jersey). Using the old labeling tool, I could filter with SCALERANK to do that, but I don’t see how to filter the output of the new labeling tool. Can we apply filters to it?

    As a workaround, I tried defining a new field “LABEL_SIZE” (=13 is scalerank=1 and 0 otherwise), but I didn’t manage to set the label font size to the value of this field, because this new field did not appear in the menu proposed in the label properties window. If you have any tip, I’ll appreciate!

    #4398

    Nathaniel
    Keymaster

    Under the layer’s normal property dialog, the general tab, query builder button. Make the filter selection.

    You’ll want to have 2 layers, one for drawying the shapes on the map. The other for just the labels.

    #4399

    topoman
    Participant

    It worked, thank you Nathaniel!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.