My Account     Contact Us     Cart

Mapping Class: Efficient Labeling using attribute expression builder with Steve Spindler

Welcome back to this month’s edition of Mapping Class. The Mapping Class tutorial series curates video tutorials and workflows created by experienced cartographers and Avenza software users. Joining us once again is Steve Spindler, a longtime MAPublisher user, and expert cartographer. Steve is here to show you a quick tip for using the attribute expression builder within MAPublisher to quickly perform batch edits of labels. 

Steve has produced a short video to demonstrate how he uses the expression builder to quickly edit street names. The Avenza team has produced video notes (below) to help you follow along.

***

Label efficiently using Attribute Expression Builder
by Steve Spindler (video notes by the Avenza team)

With MAPublisher, labeling your maps is a breeze. With powerful tools such as LabelPro, labeling is only a matter of selecting the data you want to label, and configuring a robust set of rules that control how each label is placed and styled. But before you can start labeling, you must have high-quality, accurate attribute information for your map data. Since labels are typically generated by displaying text values contained in an attribute column, it is important that attributes are not only accurate but are also formatted in a way that is optimized for display on a map. In many cases, cartographers need to spend time reformatting or editing attribute information before they can generate labels, a process that can become quite time-consuming. Nowhere else is this problem more common than when dealing with street names and road network data.

This image has an empty alt attribute; its file name is Tools.jpg

When labeling streets, cartographers often spend time correcting, or even generating brand new attribute information that can be used to create more concise, effective street labels. This typically involves changing street prefixes and suffixes to a condensed short form (i.e “North Cherry Boulevard” becomes “N Cherry Blvd”). For smaller projects, this can be done by manually editing the individual attribute values directly within the MAP Attribute panel. For large projects, especially those dealing with hundreds or even thousands of map features, manual editing would be very time-consuming.

For a more efficient approach, Steve shows how you can use the Expression Builder to easily modify large selections of attribute values. The first step is to open the MAP attribute table, which displays all the attribute information contained within a specific map layer. Steve identifies the attribute column that contains the text street names and will use this to build out a new attribute column to create his labels.

This image has an empty alt attribute; its file name is Buiiklder-1024x691.jpg

Next, Steve opens the Edit Schema window of the attribute table. Here, you can access column information such as the data type, default value, field visibility, and most importantly; the expression builder.

The expression builder may seem intimidating at first, but with a little bit of effort, it can be an incredibly powerful tool for calculating attribute values and performing batch-edits on your data. The tool uses built-in operators and items in the objects list (attribute names and values, constants, functions) to calculate custom attribute information based on a specified set of expressions. In this case, Steve first creates an expression set that modifies the suffix values in the Street name field (i.e “Boulevard”) and substitutes them with the appropriate short form (“Blvd”). The expression is used to populate a new attribute column called “Road_suffix”. The end result means attribute values such as “East Utica Street” will be passed to a new attribute value of “East Utica St”.

This image has an empty alt attribute; its file name is inputs.jpg
IF_CASE(name,
ENDSWITH(name, “ Street“),SUBSTITUTE( name , “Street”, “St”),
ENDSWITH(name, “ Drive“),SUBSTITUTE( name , “Drive”, “Dr”),
ENDSWITH(name, “ Road“),SUBSTITUTE( name , “Road”, “Rd”),
ENDSWITH(name, “ Court“),SUBSTITUTE( name , “Court”, “Ct”),
ENDSWITH(name, “ Way“),SUBSTITUTE( name , “Way”, “Wy”),
ENDSWITH(name, “ Lane“),SUBSTITUTE( name , “Lane”, “La”),
ENDSWITH(name, “ Route“),SUBSTITUTE( name , “Route”, “Rt”),
ENDSWITH(name, “ Boulevard“),SUBSTITUTE( name , “Boulevard”, “Blvd”),
ENDSWITH(name, “ Turnpike“),SUBSTITUTE( name , “Turnpike”, “Tpke”),
ENDSWITH(name, “ Avenue“),SUBSTITUTE( name , “Avenue”, “Ave”),
ENDSWITH(name, “ Place“),SUBSTITUTE( name , “Place”, “Pl”),
ENDSWITH(name, “ Circle“),SUBSTITUTE( name , “Court”, “Cr”),
ENDSWITH(name, “ Highway“),SUBSTITUTE( name , “Highway”, “Hwy”),
ENDSWITH(name, “ Expressway“),SUBSTITUTE( name , “Expressway”, “Exp”)
)


Next, Steve creates a second set of expressions that will further adjust his Road_suffix attribute column to substitute any street name prefixes (North, East, South, West) with their corresponding short-form (N, E, S, W). This second expression (see code block below) is used to populate another new attribute column called “Label”, which will ultimately be used to generate the final formatted label layer. 

((IF_CASE( Road_suffix ,
STARTSWITH(Road_suffix, “West “), SUBSTITUTE( Road_suffix, “West “, “W “),
STARTSWITH(Road_suffix, “South “), SUBSTITUTE( Road_suffix, South “, “S “),
STARTSWITH(Road_suffix, “North “), SUBSTITUTE( Road_suffix, “North “, “N “),
STARTSWITH(Road_suffix, “East “), SUBSTITUTE( Road_suffix, “East “, “E “)
))

This image has an empty alt attribute; its file name is ExpressionAttributes.jpg

Note that these expressions are specific to the dataset and map area Steve is using for his project. When using expression builders for your own maps, pay careful attention to the attribute values specific to your area of interest. The best part about expression sets is that they are highly flexible, meaning you can build upon and modify existing expressions, save them to your library, and even use them across multiple different mapping projects!

With his newly created “Label” attribute column, it’s simply a matter of configuring the LabelPro tool to display these formatted label values. With a bit of configuration, the end result is a clean, uncluttered, collision-free label layer. The labels now use all the correct prefixes and suffixes Steve required. By saving his expression sets to his library folder, Steve can now quickly and easily repeat the exact same batch-editing process for new maps with only a few clicks! 

This image has an empty alt attribute; its file name is ExpressionBuilder-1024x249.jpg

***

About the Author

Steve Spindler has been designing compelling cartographic pieces for over 20 years. His company, Steve Spindler Cartography, has developed map products for governments, city planning organizations, and non-profits from across the country. He also manages wikimapping.com, a public engagement tool that allows city planners to connect and receive input from their community using maps. To learn more about Steve Spindler’s spectacular cartography work, visit his personal website. To view Steve’s other mapping demonstrations, visit cartographyclass.com

Mapping Class: Georeferencing Techniques Part Two – Working with Scanned Maps, with Hans van der Maarel

Welcome back to another exciting edition of Mapping Class, a video-blog series where we curate tutorials and workflows created by expert cartographers and Avenza power users from around the world. Today we release Part Two of our Georeferencing Techniques tutorial with Hans van der Maarel, owner of Red Geographics. In Part Two, Hans demonstrates some techniques he has developed for working with more challenging georeferencing tasks, including dealing with unknown projection information and working with scanned maps. If you missed Part One, in which Hans covers the basics of Georeferencing in MAPublisher, check it out here.

Hans has produced a jam-packed video walkthrough detailing his georeferencing process. The Avenza team has produced video notes (below) to help you follow along.

***

Georeferencing Techniques Part Two: Working with Scanned Maps
by Hans van der Maarel (video notes by the Avenza team)

As we discussed in last month’s Mapping Class, georeferencing is the process of taking imagery or map data that lacks geographic location information and associating it with specific coordinates on Earth. Previously, Hans showed us how MAPublisher provides a few tools that make georeferencing simple vector map data a painless process (Check out part one here!). Best of all, using the built-in georeferencing tools, this can be done entirely within the Adobe Illustrator environment.

However, what can you do if you are working with historical maps or scanned images that lack spatial referencing or detailed projection information? This can present a challenge for many cartographers, as the projection information is necessary to create an effective cartographic product that will minimize distortion and maximize the spatial accuracy of the final result. To tackle this problem, Hans shares a series of tips and tricks that he uses for working with scanned historical maps. He uses a beautiful historical map of Northwest Africa to demonstrate his approach.

Right away, Hans identifies a few obstacles. First, he notices that the scan is not a perfect copy of the original map. Due to natural curves and bends in the physical paper version of the map, there is minor distortion in the digital image that arose when the map was scanned. This could create problems for georeferencing the image, as the “fitting” process can be susceptible to image distortions, even when a suitable projection is determined. Thus it is always a good idea to examine your scanned map prior to beginning the georeferencing process. Becoming aware of potential issues with the scanned map data can help inform decisions on the data’s suitability for a particular mapping task. Acknowledging that the distortion is relatively minor in this scanned map, Hans chooses to proceed with the georeferencing process.

Hans notices that the scanned map image does not provide any details on the original projection information. Instead, Hans must make an “educated guess” on which projection was being used. With a bit of research, he discovers another map from roughly the same era and displaying a similar region. Recognizing the similarities between this map, and his scanned map, Hans decides to implement a Lambert Zenithal (Azimuthal) Equal Area Projection.

Hans discovered this map from 1968, which displays approximately the same area. He chooses to use the projection information from this map to help with the georeferencing process of his scanned map.

Hans can begin his georeferencing process by first setting up a new MAP View with the Lambert Azimuthal Equal Area Projection, a conical projection used in many atlas-style maps. To help with the georeferencing process, Hans has used the Import tool to display a vector line layer of coastlines using Natural Earth DataHe can use this coastline data as a guide to help align his scanned map during the georeferencing process.

Before moving on, Hans brings up two important things one must consider when working with conical projections: the central meridian and the latitude of origin. When working with scanned maps that include graticule lines, a quick and easy way to help identify the central meridian is to look for the meridian line that closest approximates a straight line. Using the graticules on the scanned map, Hans can approximate a central meridian of about 11 Degrees. In the MAP View Editor, a user can open the projected Coordinate System Editor and modify the definition for the lambert azimuthal equal-area projection to have a central meridian that matches his estimation.

Placing the scanned map layer onto his newly modified MAP view, Hans can then begin the process of manually aligning the map image to match his projected coastline data. One of the easiest ways to support this process is to configure the MAP View editor panel to display layer thumbnails. With this configured, a user can begin manually adjusting the MAP layers until they are suitably aligned.

Hans reiterates that this process is not an exact science. He has made several assumptions on the projection parameters, and the overall accuracy of the original map. He indicates that a user should spend some time trying to get the best possible result, however it will be difficult to achieve a perfect match (especially given the distortions that can occur when a map is scanned from a physical copy). This process can take anywhere from minutes to hours, and requires a lot of manual adjustment, trial and error, and most importantly, patience! The result, however, is that the finalized scanned map layer is correctly projected and georeferenced into a MAP view. From here, adding data layers, annotations, labels, or tracing vector layers from the scanned map can all be completed in a spatially aware mapping environment.

Providing a second example using a slightly different approach, this time Hans uses a map of the Arctic Region. He indicates that although he has been provided with a map of the entire polar region, the client is only interested in the area surrounding the Bering Strait (between Russia and Alaska). As with the previous example, the first step is to identify the best projection to use. Hans correctly guesses that the map provided likely uses the Polar Azimuthal Equidistant Projection based on visual inspection. However, it should be noted that there is room for trial and error here, and users should not be afraid to explore the large coordinate system and projections library included with MAPublisher to try out and test different projections to help narrow down one that fits best.

The first thing Hans notices is that the scanned map image is rotated about -90 Degrees from what is displayed in his reference coastline data. Once again, by visiting the MAP View Editor, Hans can rotate his Map layers without breaking the spatial referencing information of his original map data. By doing this, Hans assures that his map layers are aligned on the same rotational angle, and can then begin to focus on scaling the layers.

Hans uses the MAP view editor panel to apply manual adjustments to the map layers. He notes that a cartographer should always consider the area of the map they are most interested in. For example, although his map covers the entire polar region, Hans indicates the final product will only display the regions surrounding the Bering Strait. Given this, the georeferencing process should be primarily concerned with accurate alignment in the Bering Strait area, while distortion in other areas is seen as acceptable.  In the example below, you can see how Hans has achieved a suitable level of georeferencing accuracy in his primary area of interest, despite the non-important areas (i.e the Canadian Polar region, eastern Siberia, Greenland) having relatively low georeferencing accuracy.

With his newly georeferenced scanned map layers. A cartographer can now use the information contained within these scans to supplement a larger cartographic process. For example, Hans can now use the scanned maps to digitize boundaries, or geographic features that may not be present in modern digital datasets (for example, historical boundaries for different countries, or terrain features that are no longer present)

***

About the Author

Hans van der Maarel is the owner of Red Geographics, located in Zevenbergen, Netherlands. Red Geographics is a long-time partner of Avenza and Hans is a well-known power user of both MAPublisher and Geographic Imager. He uses the products for a wide range of cartographic projects for several international organizations and offers training courses and consultancy expertise aimed at developing workflows for clients. In addition to that, he is currently a board member of NACIS. To find out more about Red Geographics, and to see more work by Hans, visit redgeographics.com

Mapping Class: Georeferencing Techniques Part One – The Basics, with Hans van der Maarel

Welcome back to another exciting edition of Mapping Class, a new video-blog series where we curate tutorials and workflows created by expert cartographers and Avenza power users from around the world. For this article, we are excited to introduce Hans van der Maarel, owner of Red Geographics, and expert cartographer. Joining us from Netherlands, Hans has put together a video tutorial showcasing tips and tricks for tackling Georeferencing in a variety of different mapping scenarios. In this first part, Hans goes over the basics of georeferencing in MAPublisher, using a neat city map of Zevenbergen. Tune in for Part Two, coming soon, which will reveal how Hans approaches more challenging georeferencing tasks, including dealing with unknown projection information and working with historical maps.

Hans has produced a short video walkthrough detailing part one of his georeferencing process. The Avenza team has produced video notes (below) to help you follow along.

***

Georeferencing Techniques Part One: The Basics
by Hans van der Maarel (video notes by the Avenza team)

Georeferencing is the process of taking imagery or map data that lacks geographic location information and associating it with specific coordinates on Earth. Georeferencing is a very common, but sometimes challenging step that is necessary for producing accurate, meaningful cartographic products. By georeferencing map data, cartographers can ensure that the features on their maps are located correctly, and in a way that accurately represents the real world. Georeferencing also makes it easy to add and update maps with new data layers, as location information stored within the new map layers will be accurately overlaid in the correct position on older map projects. The process for georeferencing maps can be complicated, but Hans has outlined some easy-to-follow steps for quickly performing and validating simple georeferencing tasks with vector map data.

In general, effective georeferencing needs to include at minimum three known control points. In this example, Hans has included an additional fourth control point to provide additional accuracy. 

When locating control points, it is a good idea to choose points that roughly approximate the four corners (quadrants) of your map area. Doing so can ensure the georeferencing result is accurate for the entire coverage of the map area and minimizes distortion/shearing effects as the map layers are matched to the final coordinate system. Cartographers should take time to ensure the chosen control points are as accurate as possible, as errors in control point placement will propagate across all locations in the map. Poor control point placement can lead to overall poor georeferencing accuracy. 

Using the MAP Page location tool, place four control points at known, easily identifiable locations. Hans recommends placing control points at recognizable map features that can be easily seen on the reference imagery. For this example, Hans chose to use the corners and edges of major structures (i.e larger buildings/reservoirs) or the centers of well-known major road intersections. When using road features as reference control points, Hans recommends using the center of the feature rather than the edge. This can compensate for variation in road edge placement that can occur when the vector line layer does not completely match the true road/lane width in the imagery.

Mapping Class Georeferencing control point

Next, open the Georeferencing tool and select the “Add World Locations” option. From here, use the built-in web map to calculate latitude/longitude coordinates for each of your known control points. Using the satellite imagery view can make this process easier, especially when dealing with physical features on the map (i.e building corners). Repeat this for each of the four control points.

The resulting table will show a list of set coordinates for each of these control points. From here, if you already know the projection the map data is already in, you may set this coordinate system at this stage. If you are unsure, the georeferencer tool will automatically provide a suggested list of coordinate systems that match the control points you have set. These “best” matches are provided based on measuring the error between your user set coordinates and the real-world locations on the web map. Ideally, you want the lowest combined error value. In general, the suggested coordinate systems at the top of the list are often the best choice.

Once you select the desired coordinate system, the tool will automatically create a new MAP View where you can house your newly georeferenced map data. You will notice that the MAP Page Locations you created earlier will be displayed alongside the newly georeference control points. This is a great way to help validate your georeferencing as you will be able to observe the accuracy (or inaccuracy) of your placed control points.

Finally, it is a good idea to use the Find Places tool to validate your georeferencing results. Try searching for identifiable landmarks or major features on your map (i.e. train stations). Simply search for a location using the Find Places tool, and compare this to the georeferenced locations on your map.

This concludes Part One of “Georeferencing Techniques with Hans van der Maarel“. Now that you have covered the basics of Georeferencing in MAPublisher, tune in for part two in the next edition of Mapping Class. There you will see how Hans tackles more complex georeferencing projects, including what to do when you have small-scale maps that come from scanned or printed images, or where projection or referencing information is unavailable. Hans will be using a beautiful historical map of northwest Africa to demonstrate this problem. Look for it in the Avenza Resources Blog next month.

***

About the Author

Hans van der Maarel is the owner of Red Geographics, located in Zevenbergen, Netherlands. Red Geographics is a long-time partner of Avenza and Hans is a well-known power user of both MAPublisher and Geographic Imager. He uses the products for a wide range of cartographic projects for several international organizations and offers training courses and consultancy expertise aimed at developing workflows for clients. In addition to that, he is currently a board member of NACIS. To find out more about Red Geographics, and to see more work by Hans, visit redgeographics.com

News Archive