My Account     Contact Us     Cart

Labeling Trick for MAPublisher

This blog post was written by Avenza reseller in The Netherlands, Hans van der Maarel of Red Geographics.

When you’re labeling point features (let’s say cities) in MAPublisher, using either Label Pro or Label Features, and you’re not placing a label for every single point, you’re left with the task of removing the points you haven’t labeled. This trick will have the text inherit the attribute structure of the points including a lat/long and guarantee that there are no orphan points.

Take for example the above map. I want to label the cities, but not all of them. I’ll decide as I go along which city will get labeled, and which will get dropped. In order to more easily remove the unlabeled cities I need to do some preparation. I’ll create two columns in the cities layer, X and Y, and assign the expression #MapX and #MapY to them, respectively. It’s important that you do this through the Apply Expression option in the Map Attribute panel.

This gives two attributes with the original coordinates of the city points.

Next, I’ll create a layer for the labels and put it into the MAP View as a text layer, indicating that I want to copy the attribute structure of the cities layer.

Now that all the preparatory work is done, I’ll start the labeling. I’m going to be using the Label Features option, but this will work with MAP LabelPro as well.

If I select one of the texts and look at its attributes, I’ll see that the attributes from the city point have been transferred to the text, including the X and Y attributes which hold the position of the original city point.

Next, I’ll remove the city points layer, select all city labels and use the Export Attributes option in the MAP Attributes panel:

This will export a comma-delimited text file (CSV). Make sure to check the “Field names on first line” option. It’s not exactly necessary, but it will make things a lot easier.

Import the CSV file back into MAPublisher. Make sure to specify that the projection of the data is the same as the existing MAP View. Once the data is imported, you can apply any existing Stylesheets that you had in place to style the cities, or create a new one. This way, you end up with just the symbols for the cities you’ve actually labeled.

News Archive