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

Mapping Class: Importing OpenStreetMap data using Overpass Turbo with Steve Spindler

We are back with another exciting addition to our Mapping Class tutorial series. The Mapping Class tutorial series curates demonstrations and workflows created by cartographers and Avenza software users. For this article, we are welcoming back Steve Spindler, a longtime MAPublisher user, and expert cartographer. He has shared with us an excellent tutorial on creating a map from scratch using openly available geographic data from OpenStreetMap, and accessed through Overpass turbo. Steve shows how you can create query statements to filter and export the data, and demonstrates how you can import the data into MAPublisher before using a selection of cartographic styling tools to create a visually appealing map.

Steve has produced a short video walkthrough detailing his map-making process. The Avenza team has produced video notes (below) to help you follow along.

***

Importing OpenStreetMap data using Overpass Turbo
by Steve Spindler (video notes by the Avenza team)

Finding and accessing good quality data is often the first challenge for any cartography project. OpenStreetMap (OSM) can be an excellent source of open vector data describing land cover features (roads, parks, rivers, buildings, trails, infrastructure, boundaries). Once collected, cartographers can use OSM data to create highly detailed maps using the MAPublisher plug-in for Adobe Illustrator. Steve will demonstrate his process of collecting raw data from OSM and using it to craft a beautiful map of the Niagara Falls Area. The following video notes summarize Steve’s approach. 

First, you will need to extract some data from the OSM database. Since OSM is a massive repository of geographic data, you’ll need a way to filter through and extract only the data needed for your specific map project. Overpass turbo is a web-based data mining tool that can make querying and exporting OpenStreetMap datasets easy. The tool allows users to apply query statements that filter the OSM database based on attribute and location information. Using the Overpass turbo “Wizard”, a user can enter simple queries (i.e. “water”) and automatically filter and select all features that match the query statement, making it easy to export specific data for your map.

Steve uses a simple query to obtain all map features that are considered “water”. This includes both natural and man-made features

The tool allows the user to export the filtered datasets into geoJSON format, an open standard format for storing and representing geographic data and attributes.

The geoJSON datasets collected from Overpass turbo can then be imported directly into MAPublisher for styling into a finished map. Use the Import tool to load the data onto an Adobe Illustrator artboard. From here, you can open the MAP View editor to adjust the scale and projection information for each map data layer. For this map, reproject the data into State Plane NAD 83 to preserve an accurate spatial scale. Set the scale option to 25,000 and customize the position of the map data on the artboard.

If needed, use the Vector Crop tool to trim the map data down to a specific area of interest, and simplify the layer to create smoother lines by removing excess vertices.

Back in Overpass turbo, you can build more specific query statements to extract individual features from larger data categories. Use the statement: name = “Niagara Falls”, to select polygon features specific to the waterfalls in that area.

Import this new data into MAPublisher, and drag and drop it into the same MAP View as the water layer. The data will be automatically scaled and projected to align with the water layer. Apply a graphic style fill for the water bodies and waterfall area.

Next, we can go back to Overpass Turbo and extract road and highway data. You can build out more complex query statements using basic database operators (i.e. and/or). For longer, complex query statements it helps to create saved queries that you can re-use. This map uses a saved query statement called “selected roads with residential” to extract line features covering most road types:

(highway=primary or highway=secondary or highway=cycleway or highway=path or
 highway=motorway or highway=trunk or highway=tertiary or
 highway=neighborhood or highway=footway or highway=service)

 

Import the roads data into the same MAP View as the other datasets. If you look at the MAP attributes you can see the road data is split into several different types. Steve use’s MAP Themes to create rules-based stylesheets to visualize the different road lines based on their road-type attributes. Steve designed a rule-set that made minor roads more subtle in appearance, while major roads and highways became more prominent. He also used colour to distinguish between pedestrian and vehicle network links.

Repeat this process with a building footprint layer and crop all layers in the final map to the artboard extent. The finished product is shown below (top). Some final touch-ups in photo editing software can be used to create a more stylized appearance (bottom).

Exported map from Illustrator

Stylized version modified with Photo editing software

***

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: Creating Orthographic Locator Maps with Steve Spindler

 

We are proud to announce the start of a new video-focused blog series called Mapping Class. This blog series will curate tutorials and workflows created by cartographers and Avenza software users from around the world. We begin with a mapping workflow from Steve Spindler, a longtime MAPublisher user, and expert cartographer. He has shared with us his own take on creating Orthographic locator maps by applying some neat design tricks and utilizing MAPublisher’s powerful projection tools to create a simple, yet effective map.

Steve has produced a short video walkthrough demonstrating his process and has summarized the technique in the written article below.

***

Creating Orthographic Locator Maps
by Steve Spindler

An orthographic map is like a view from space. It’s useful for directing attention to someplace on the planet.
This video shows how an orthographic locator map is made in Illustrator using MAPublisher. The template illustrator file I use in the video is here.

 

We’ll start off by locating Paris on the map using Find Places. We need the latitude and longitude to create two projections.
Next, get the Latitude and Longitude from Map Attributes. You’ll have to turn MapX and MapY fields on. MapX is longitude. MapY is Latitude.

In Map Views, click on the projection, (ne_110m_land), and then select “Perform Coordinate System Projection”.
Select Projected Coordinate Systems and search for Azimuthal Equal Area. Duplicate, rename and set the definitions for the central meridian and the latitude of origin. There might be more than one. Pick one.

Select Projected Coordinate Systems and search for Orthographic. Duplicate, rename and set the definitions for the central meridian and the latitude of origin. There might be more than one. Pick one.

Select the new azimuthal projection, the one you created, and click OK to use it.
We use the azimuthal projection to crop data before creating the orthographic projection. Otherwise, there will be overlapping imagery. Next, create a buffer for the Paris point that is 10002.5 km around the point. This will be located on a new layer.

Use the path utilities tool to convert the bezier circle into polylines. Then reproject the map to the orthographic projection. Once completed, crop again with your circular buffer layer and delete the water layer. It will be replaced with a gradient.

Finally, add a radial gradient to the circular buffer layer and move the circle below the other layers.
Now you have an orthographic locator map that you can continue to style and label for your purposes.

***

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 see the original tutorial article, or view Steve’s other mapping demonstrations, visit cartographyclass.com