Sometimes when you’re on the hunt for geospatial data, all the data you need isn’t available in common file formats. Luckily for us, lots of data is available on Web Map Services (WMS), Web Feature Services (WFS), ArcGIS Online, ArcGIS Web Services, and PostGIS.
Data can be imported into MAPublisher from all of these services. Importing from a server connection always retains the attributes and referencing that exists in the original data. In order to import from a server, an internet connection is required.
WMS and WFS services can be part of open data portals, or for private use. Both services allow you to add layers of data to your map in MAPublisher, but have different functionalities. WMS allows you to import raster data in a variety of formats, while WFS allows you to import vector data.
To import from WMS or WFS, go to Import or Multi Data Import, and choose Web Map Service, or Web Feature Service from the Format listbox. Once you’ve selected the source you’d like to use, load services from Avenza (pre-loaded services) or, import your own from a file.
Once you’ve selected your specific service, you can select the layers you’d like to import. Information such as layer name and description is included. There is also the option to use the spatial filter directly in the layer selection box, to use the extents of another layer to specify, or specify exact coordinates to limit the area being imported.
When importing data from WMS or WFS, you have the option to use the spatial filters, layer filters (attribute expressions included!) and simplification. These options allow you to filter the data to better suit your needs.
If you’re importing from ArcGIS Online, you’ll need an ArcGIS Online account, and an internet connection. Once you’re logged in, you’ll be able to select data to import. When importing data, you can choose Feature Layers, Map Image Layers, and Tile Layers to import.
When importing Feature Layers, you’re able to filter the data as well. Once you select the Feature Layer that you’d like to import, you can choose to ‘Edit Query’ and write a SQL statement to narrow down the features or attributes you’d like to import.
Once your query is made, your data can be imported.
If you want to import Map Image Layers or Tile layers, you’re able to choose a specific area to import, very similar to the Spatial filters available when importing other files. Using the ‘Select Area’ option can help reduce the size of the image you’re importing and helps crop data before you import it, so you’re not importing large amounts of data you’re not going to use.
In order to import from ArcGIS Web Service, you’ll need an ArcGIS Web Service URL. Previously imported services are saved in the Service URL drop-down list.
Lastly, if you’re importing data using the PostGIS option, you also have the ability to filter your data. You can specify a Spatial Filter, and manually set the coordinates for points 1 and 2.
This will allow you to import only the data you need! You can also filter your data using a SQL query, which will help reduce the number of features or attributes you need to import.
Importing from different servers can be a great way to get different data. The best part about importing from servers is that MAPublisher allows you to filter as you import, just as you can when importing other file types. Crop or query the data as you see fit, regardless of where the data came from!
Using a Web Map Service (WMS) is a great way to easily get up-to-date imagery for your project. An issue you may run into, however, is that a server may not allow you to download images over a certain size (in pixels). The image resolution provided on most servers is usually high enough for most projects but there may be some instances where a higher resolution is needed (e.g. a poster-sized map or a web map that covers a large area).
One possible workaround for this issue is to get several small-area, high-resolution images from a WMS and then mosaic them together to make one large-area, high-resolution image. Here, we will use the City of Toronto Web Map Service to:
Get an image of downtown Toronto
Tile the image to split it into four smaller images
Use the extents of the four tiled images to get four high-resolution images
Mosaic the images to one large high-resolution image
Download an Image from the Web Map Service
First we will get an image of downtown Toronto from the City of Toronto WMS. Click the Advanced Import button on the Geographic Imager panel. Select Web Map Service from the Format drop-down and click Browse. Click Load services from Avenza and select City of Toronto WMS from the list.
Select City of Toronto Imagery from the list of layers. Click Select Area then drag a box to zoom in on an area of downtown. Click OK to return to the previous window. There is no need to change the image size because we will use this image to get the extents of a higher resolution image. Leave the other options as default and click OK to load the image, and click OK again on the Advanced Import dialog box. The selected image will now open in Adobe Photoshop.
Tile the Image
Next, let’s tile the image to split it into four separate images. Open the Tile dialog box from the Geographic Imager panel. Choose By Number of Tiles as the Tiling Schema and change Horizontal and Vertical to 2. Change the Horizontal and Vertical Overlap to 3 percent. It’s important to have overlap between the images so they will mosaic properly when the data is transformed.
Click the Keep Images Open check box to enable it. Choose a name and location to save the tiles. You can save them to a temporary location because they will not be part of the final product. The four image tiles will open in separate tabs.
Estimate a Web Map Service’s Maximum Image Size
Open the City of Toronto Imagery WMS again and select an area. In this service, as with many other services, the maximum resolution is not provided. We can, however, use trial and error to find the largest image that the service will allow us to download. A WMS has a maximum allowed width and height set for an image request. The maximum width is usually the same as the maximum height.
Set the resolution of the image by adjusting the width of the image in pixels under Output Options. First, try setting Image Size to a pixel width of 5000. Height will update automatically based on the image’s dimensions. Click OK and you will see an error that says “Parameter ‘width’ contains unacceptable value” (or height if the images higher than it is wide). OK the error to close it.
To estimate the maximum width and height allowed by a web service, you can adjust the image size to see when the server returns an error. The maximum width and height for the City of Toronto WMS is about 4000 pixels.
Downloading and Mosaicking Large Images
Next we will use the geographic extents of the four tiled images to download four higher resolution images with matching extents then mosaic the images together. Import an image again from the City of Toronto WMS using Advanced Import. Select an area, click Select Area by Another Document’s Extents and choose the first tiled image from the dropdown menu. The Select Area dialog will display an area matching that image’s area. Click OK to return to the previous screen.
Enter 3000 as the Image Size. Click OK to add the image to the Advanced Import dialog box. Repeat the above steps for each of the remaining three tiled images.
Creating a mosaic of four images (two by two) makes a single image just under 6000 pixels wide because of the overlap between the tiles (the height will vary depending on the area you selected). This is larger than the maximum size allowed by the WMS. Check the box Mosaic All Files to the Destination Document and select one of the images currently loaded in the dialog window from the drop-down menu. Leave the other options unchecked and select Normal as the Layer Blending Mode. This will merge the four images into a single document.
Avoid Downloading Images Greater than the Maximum Image Resolution
One further consideration when getting imagery from a service is to avoid requesting an image that is higher resolution than the full resolution of the image on the service. In this case, the number of pixels in the image and, therefore, the image size will increase without any increase in the actual resolution of the image.
To see an example of this, get an image from a WMS by zooming in on a small area and downloading images of varying resolution. The pictures below show two images of the same area side by side at different resolutions. The image on the left is 1024 by 870 pixels and the one on the right is 2500 by 2124 pixels but there is no noticeable difference between them. This is because the image exceeds the resolution of the image on the server so the WMS resamples the image to a higher resolution, creating duplicate pixels.
With the latest release of Geographic Imager 5.2, it’s now possible to easily import images directly from an ArcGIS Online account or an ArcGIS web service. This will allow you to use shared data within your ArcGIS Online organizational account and connect to publicly available map servers from various online sources.
ArcGIS Online is a collaborative web GIS that allows you to store and share GIS data using Esri’s secure cloud. Before, you may have had to download raster layers to your local machine and then import them into Adobe Photoshop using Geographic Imager. Now, Geographic Imager has a much-improved workflow to get ArcGIS Online image layers into Adobe Photoshop with full georeferencing.
Currently, the types of datasets allowed are Map Image Layers and Tile Layers. To load a layer, open Advanced Import and select ArcGIS Online from the Format drop-down list. Enter the credentials for your ArcGIS Online account and select an image layer from your user portal.
Images can be resized and transformed on import. To extract a specific area from the image, click Select Area. The interface is the same as the one used for WMS Import.
In addition to using your own organization’s data, you can connect to publicly available data from a wide variety of organizations by connecting to an ArcGIS Web Service. To connect to a web service, use Advanced Import and select ArcGIS Web Service from the Format drop-down menu. Click Browse and enter the URL for the service. This is a great option when searching for data from open data portals created by government agencies.
Avenza Maps is capable of importing and displaying georeferenced maps in several different formats. The app processes a map by rasterizing and tiling it on import. The speed and result of processing will vary depending on the type of file used and the size and dimensions. We’ll discuss the types of files allowed and the advantages of each.
Usually larger files take longer to process than smaller ones with some exceptions. An image may have a very high resolution but a small disk size due to image compression. It is recommended that images be less than 100 megapixels for upload to the app. A geospatial PDF file with many vector features may also take a long time to process. In this case, you should convert the file to an image to avoid having to rasterize vector data in the app.
Maps can be loaded into the app faster by processing them before import. Maps can also be preprocessed by uploading them to the Avenza Maps Store or using the Export to Avenza Maps tool in Geographic Imager or MAPublisher.
Comparison of Allowed File Types
A GeoTIFF is a TIFF file (Tagged Image File Format) with spatial information embedded in the file. This format is typically the preferred format for uploading directly to Avenza Maps without preprocessing. Since this is an image format, the app doesn’t need to rasterize the file on import meaning processing times will generally be faster compared to PDF’s, and it will maintain the native resolution.
It is also possible to import a normal TIFF file by zipping it with a TIFF World File (TFW) and either a WKT or PRJ file which contains projection information. It is best not to do this for the sake of simplicity. Usually, any GIS software that can produce a world file will also be able to save to GeoTIFF.
A Geospatial PDF stores spatial data in either raster or vector format as well as associated attributes and layer information. Files should comply with the Adobe Acrobat PDF 1.7 specification which has been standard since 2006.
Avenza Maps rasterizes geospatial PDF files on import which discards layer and attribute information. PDF files typically take longer to process than image files. There is also a chance that the file may process incorrectly (e.g. discarding labels).
Despite this, there are some instances when it may be preferable to use a geospatial PDF file. For example, the map may already be in this format and isn’t worthwhile to convert to another format. Geospatial PDF files tend to be smaller than image files so they would be a good solution if device storage space or download speed is an issue. Also, occasionally converting from PDF to TIFF degrades the image quality and may make maps illegible.
To ensure a geospatial PDF file has a good balance between size and quality, open the file in Adobe Acrobat and go to Advanced > PDF Optimizer. This is especially helpful if the map contains large raster images.
JPEG is an image format like TIFF but it does not have the ability to store spatial information. To load a JPEG into Avenza Maps, it must be zipped with a JPEG World File (JGW) and either WKT or PRJ file. JPEG files are compressed so this may be an option to consider if file size is a consideration, however, a better alternative would be to compress a GeoTIFF file.
Processing Maps with MAPublisher, Geographic Imager, and the Map Store
It is best to process maps before loading them into the app because desktop computers are more powerful than mobile devices. It also avoids having to process the file each time the map is loaded onto a device. Geographic Imager and MAPublisher each have a utility to export to an Avenza Maps package with the capability to upload directly to the Avenza Map Store if you have a vendor account.
Running these utilities produces a folder that contains a ZIP file with a thumbnail to show a preview of the map, a reference file, and a folder called tiles that contains a tiled version of the map in PNG format. This ZIP file can be imported into the app in the same way as other files.
With the latest release of MAPublisher 9.9, it’s now possible to easily import layers directly from an ArcGIS Online account or an ArcGIS web service. This will allow you to use shared data layers within your ArcGIS Online organizational account and connect to publicly available map servers from various online sources.
ArcGIS Online is a collaborative web GIS that allows you to store and share GIS data using Esri’s secure cloud. Before, you may have had to download layers as shapefiles to your local machine and then import them into Adobe Illustrator using MAPublisher. Now, MAPublisher has a much improved workflow to get ArcGIS Online layers into Adobe Illustrator will full georeferencing, all map features, and attributes.
Currently, the types of datasets allowed are Feature Layers, Map Image Layers and Tile Layers. To load a layer, use MAPublisher Import as you would with any data type and select ArcGIS Online from the Format drop-down menu. Click the login link to enter your ArcGIS Online credentials to access your organization’s web portal.
Feature Layers contain vector data that will import as artwork into Adobe Illustrator. Optionally, you can extract specific features using standard SQL queries. Map Image Layers and Tile Layers are raster data layers that can be added by selecting the geographic extents.
In addition to using your own organization’s data, you can connect to publicly available data from a wide variety of organizations by connecting to an ArcGIS Web Service. To connect to a web service, use MAPublisher Import and select ArcGIS Web Service from the Format drop-down menu. Click to select the dataset and enter the URL for the service. This is a great option when searching for data from open data portals created by government agencies.
Accessing Esri’s online services through MAPublisher provides a great opportunity to use shared data within your organization and access a wide variety of publicly available data. We’re sure you’ll find it very useful for finding data to make great maps.
Online services can be used to create high-quality maps without the need to download and maintain large spatial datasets or spend time designing base maps. In this post, we’ll use two online sources to import data and create a map showing the potential energy generated from existing and proposed wind power projects in the state of Massachusetts.
There are two types of online mapping services MAPublisher can use to import layers: Web Map Services (WMS) and Web Feature Services (WFS). WMS is an interface for accessing geo-registered images from an online source. This means that users aren’t able to modify individual elements of a WMS layer and are only able to select an area of the map to import. WMS also allows for transparency so map layers can be overlaid on top of one another.
WFS, on the other hand, is an interface for accessing vector map features in GML format. Features are imported as a MAP Layer which can be further modified using MAPublisher and Illustrator tools. To create this map, we’ll import data from two sources: a topo map from the US Geological Survey (USGS) and the Massachusetts Office of Geographic Information (MassGIS).
To start, open Adobe Illustrator and create a new document in portrait mode. Import a MAP Layer and select Web Feature Service from the Format drop-down. Click the “Click to select services and layer(s)”. link. The MassGIS layers are included with MAPublisher by default. If you do not see this service, click Load Services from Avenza. Select Commonwealth of Massachusetts, USA – MassGIS in the USA folder.
On the Select Features dialog box, select Wind Power. Note the default SRS – EPSG 26986. On the Import dialog box, click the link to select a coordinate system. Choose Massachusetts Mainland Zone (EPSG 26986). Click OK.
The Wind Projects layer has been imported as a MAP Layer. It can be modified using MAPublisher or Illustrator tools to symbolize, label, select, and so forth. To create the style for this layer, add a new Stylesheet MAP Theme of Point feature type, then Batch generate rules for the KW column using three quantiles, and select Set scale so the symbols scale proportionally to the value. For more on how to replicate this style, see the MAPublisher Help article MAP Themes.
The next step is to import a WMS layer to use as a base layer. This map uses the USGS Topo Base Map which was created as part of the National Map program. A list of WMS and WFS services provided by USGS is available at http://viewer.nationalmap.gov/services/.
Go to the USGS web page and open the WMS link under Base Maps (Cached) > USGS Topo Base Map – Primary Tile Cache (Tiled). This is an XML document with the location and metadata of the WMS. Copy the link from the address bar and in Adobe Illustrator, click the MAPublisher Import button and choose Web Map Service from the Format drop-down menu. Click the “Click to select service and image” link. Click Add New Service and paste the URL into the GetCapabilities URL text box. Choose the service from the list and click OK.
On the Select Web Map Layer dialog box, choose USGS Topo Base Map from the Layers list. Set the Image Size to 1000 to increase the resolution. To change the extents of the output image click Select Area. This dialog box provides several options for setting the extents of the base map image. Click-and-drag to specify an area to select – the image will automatically crop. The buttons at the top of the panel allow you to enter the coordinate extents manually, match the extents of a MAP View or match the extents of a vector layer. Since we have already added the Wind Power layer to the map, we will set the extents to match this map view by clicking “Select area by MAP View” and choosing Wind_Projects from the drop-down menu. Leave the other options as default and import the base map image.
For the final step, open the MAP View panel and drag the layer DMARRIER.EEA_WIND_Point to the MAP View USGS_TNM_Toppo_Base_Map. This will transform the points to the same coordinate system as the base map.
There are thousands of freely available WMS and WFS sources available online. For a good starting place see this blog post from the Open Geospatial Consortium for advice on finding services. You could also use a basic web search – for example – “WMS Toronto” or similar. For more help on web services in MAPublisher see the help article Web Map/Feature Service.
In this blog post we’ll look at how you can control the order of layers in MAPublisher when using FME Auto.
FME currently doesn’t provide a way to explicitly define the output order of Feature Types in a workspace. In the Navigator you can reorder Readers and Writers to control the order in which they are run, but unfortunately you cannot do the same with the Feature Types they read and write respectively.
By default when you write layers to MAPublisher from FME using FME Auto, the layers are arranged first by geometry (text first, then Points, Lines, Polygons and lastly Images), then alphabetically by layer name. This behaviour can be changed by unchecking the FME Auto Parameter “Sort Layers by Geometry”. Once this has been turned off, MAPublisher will display layers in the order they are received from FME. Using this behaviour, some FME transformers and a Feature Type fanout (or new to 2015.1, specifying the Feature Type name) we can control the order of the layers in MAPublisher for optimal cartographic output.
The first thing we want to do is to add some input Feature Types.
We will then create a template AttributeCreator Transformer to give each layer two attributes: MP_LayerName and MP_Order. MP_LayerName will define the name of the layer in MAPublisher and MP_Order will determine the order the layer is passed to MAPublisher; hence the order in which it is displayed.
Each Feature Type will be connected to a copy of the AttributeCreator Transformer and the values will be populated for that layer. The layer with an order of 1 will be on top with larger numbers descending below.
Once this is done, all the inputs can be connected to a Sorter Transformer. The Sorter will be set to numeric and ascending.
Finally, the MAPublisher writer is added. The Sort by Geometry parameter needs to be set to No and the Feature Type name should be set by the MP_LayerName attribute we created earlier. This replaces Feature Type fanouts and has slightly new behaviour at FME 2015.1. It is explained more fully (here).
Once we run the workspace, we’ll see the layers in the Adobe Illustrator Layers panel in the exact order we specified.
One of Adobe Illustrator’s powerful yet occasionally confusing features is the ability to apply fills, strokes and Graphic Styles to art at either the Object level or the Layer level. This is extremely useful because you can effectively use Layers to set up symbology templates so that any art that is drawn on a Layer inherits its appearance from that Layer. Confusion often arises when users combine art styles at both the Layer and Object levels, and cannot figure out why their map does not look how they expect it to look. Most of the examples here are going to be based around using the Appearance panel to apply strokes and fills.
Selecting Objects or Selecting Layers
The first decision you have to make is how you select your art. You can either select the layer that the art is on or directly select the art itself. This determines where the changes you make get applied. In order to select the layer, click the circle to the right of a layer name in the Layers panel. You will see that the layer is selected (also known as targeted) by the addition of another circle around the first circle.
To select all the art on a layer you can either click in the space to the right of the circle, or Alt-click the layer name.
If you expand the layer you can see that the art is targeted rather than the layer.
Whichever method you use, you will see the art on the canvas appear as selected.
Of course you can select individual art using the Selection tool or clicking to the right of the circle next to the object name in the Layer panel.
Changing Strokes and Fills
One advantage of selecting art at the layer level over selecting art directly is the access to the strokes and fills in the Appearance panel.
If you select the layer, you do not get direct access to the art’s strokes or fills, however if you select the art you do.
You can add more strokes or fills in the Appearance panel, but if you want to add strokes or fills at the layer level, they are additional to the strokes or fills that are defined at the object level. We can see this if we style the fields individually with different fills, perhaps representing different crop types. We could also add a stroke to each object, or we can add the stroke to the layer. Adding strokes or fills like this is useful when you want to ensure that all art on that layer shares the same symbology.
Directly changing the appearance of objects is reflected both in the Appearance panel and the object thumbnails in the Layers panel.
However, if you add extra strokes or fills at the layer level, these are not shown in the objects thumbnails.
One important consideration is that it is not possible to use the Appearance panel to adjust several pieces of art with different fills or strokes that are applied at the object level. For example, suppose we have changed the colours of several building outlines, and now want to change them back to black. If we select them all, we will see that the stroke option is not available in the Appearance panel, rather it says Mixed Appearances. The fill is still available to be changed as it is the same for all objects.
Altering appearances can have different results if applied to objects or layers. A good example is a street style that is created with two strokes. If this is applied at the object level, each object is considered separate and you end up with overlapping paths.
However, if this style is applied at the layer level, the paths are styled at the same time and appear to be merged.
Applying Graphic Styles
Graphic Styles are great to easily add combinations of strokes, fills and effects to art, and these can also act differently when applied to objects or layers. In the Graphic Styles panel we have a Graphic Style with null fill and stroke, but a drop shadow added. If we try to add this directly to the building art, the null fill and stroke will cause the buildings to disappear.
However we can add it to the Buildings layer and the effect is successfully combined with the object level appearance.
Resolving Appearance Confusion
As mentioned earlier, it is possible to combine object level and layer level appearances. This can get complicated if you have different objects on the same layer with different appearances as well as appearance modifications at the layer level. Trying to work out why you cannot adjust the style of your paths because you are getting Mixed Appearance in the Appearance panel can be frustrating.
The easiest method to fix this is to use the Clear appearance button in the Appearance panel. Keep in mind that this will totally remove any appearance formatting that you have applied to your layers or objects, so it is worth creating Graphic Styles of the appearances you want to retain. Just like changing appearances, this button works at both the object and layer levels.
An example of how layer and object appearances can get confused is multiple white strokes applied to different text objects in different ways. The user has created several text objects labelling fields and added strokes to them in various different ways. However, he’d like to remove the strokes from all the text now. You can see that the different labels all have black fills and white strokes, but are subtly different.
The first thing to do is check the Layers panel. We can see that the target indicator for the Field Labels layer is raised. This indicates that an appearance has been applied to this layer.
Once we click on this we can use the Appearance panel to remove it with the “Clear Appearance” button.
That has removed the stroke from the layer and one of the text objects now has no stroke, but some of them still do.
If you expand the Field Labels layer in the layers panel you will see that some of the objects on the layer also have appearances applied directly to them.
You can select these objects and use the Appearance panel to remove its strokes as well by clicking the Clear Appearance button.
This leaves us with one final label down in the bottom right corner that still has a stroke, but has not had its appearance modified via the Appearance panel.
The easiest way to remove the stroke from this object is just to make sure the stroke is in front of the fill at the bottom of the main toolbar and click on the “None” option. Now all our field labels have a simple style.
How MAPublisher works
MAPublisher styling tools all work on an object level. This is because MAPublisher has the ability to independently style objects by attributes they possess. For example you can create a new MAP Theme for the Fields layer based on an attribute called “crop”. This will style each field differently using depending upon its crop type.
Objects will be styled using standard fills and strokes, rather than using the Appearance panel.
The MAPublisher FME Auto add-on connects the analysis and processing capabilities of Safe Software’s FME Desktop with the cartographic design and publishing environment of MAPublisherand Adobe Illustrator. Since MAPublisher 9.5, it has been possible to import georeferenced raster layers as well as vector data. This adds an extra layer of power and convenience to the FME and MAPublisher integration. The ETL (Extract, Transform, Load) power of FME can be used to pre-process raster images and load them into MAPublisher where they can be overlaid with cartographically styled vector layers.
Several components are needed to load a raster from FME into Adobe Illustrator. This example uses a generic reader for the input features. It then gets the bounding box coordinates and sends them to a second workspace that connects to a Web Map Service (WMS) and downloads Toronto imagery. The information necessary to run the second workspace is stored as attributes that are passed to published parameters in the second workspace. This imagery is stored in an intermediate GeoTIFF, which is then read by the first workspace and sent to the MAPublisher writer along with the original data. The WMS source and working coordinate system are already set, but can be modified if the study area is in a different location.
Several of the key parameters for executing the workspace are exposed as published parameters to make running the workspace easier. The user can set the desired pixel size and the pixel dimensions for the WMS request are automatically calculated. The bounding box can be buffered if required to provide extra imagery around the input data.
MAPublisher MAP Themes are stored in an Adobe Illustrator file that the MAPublisher writer uses as a template. In this case, these MAP Themes are linked to the names of the layers stored in the input data. More flexible themes could be created that bases its symbology on geometry or attribute values.
The example FME workspaces, input data and template illustrator document are attached below in the useful resources section.
Creating multiple maps that share cartographic styling is a common requirement for MAPublisher users. The most effective way to accomplish this is the use of MAP Themes. MAP Themes are a collection of thematic cartography tools designed to increase productivity by automating how styles and symbols are applied. Creating a number of MAP Themes based on regularly used layers with standard attribute schemas can greatly reduce the amount of time spent styling maps.
This guide will walk through creating and setting up MAP Themes to automatically apply to the appropriate layers upon import. If done correctly, rather than seeing this:
You will see this when importing data to MAPublisher:
1. Data Source
The data used in this guide comes from the publically available CanVec+ topographic database. CanVec+ contains a comprehensive set of layers optimized for display at 1:50,000 that are perfect for topographic mapping. In fact, many of these layers are used in the construction of the CanTopo Topographic mapping series available here.
The layers you receive from the CanVec+ download service will vary depending on what features are present in the extent chosen. The Geogratis Geospatial Data Extraction tool is the most convenient method to retrieve CanVec+ data. This guide uses a selection of CanVec+ layers styled similarly to the CanTopo maps.
All vector data was downloaded in an unprojected geodetic coordinate system and projected into a UTM projection MAP View.
The map shown above contains 12 vector layers and one raster layer, but we will only discuss the styling and configuration of three layers as the process is similar for the rest. You can download the Adobe Illustrator file at the bottom of the page if you want to examine the different layers, their graphic styles and MAP Themes.
MAP Themes are the primary method for applying attribute based cartographic symbology. A powerful feature is the ability to automatically do this on layer import based on geometry type or file name. By defining one or many graphic styles and a MAP Theme for each layer the layers can be automatically styled on import.
CanVec+ themes have a consistent naming scheme that makes them especially suitable for this sort of automated styling. Because each style is always named the same, it is simple to set up the MAP Themes to automatically apply when the layers are imported. The theme names are consistent but somewhat obscure, as are some of the attribute names and values. Luckily there is a specifications document that provides a guide to the various themes, datasets and attributes that are available. A link is provided in the useful resources section below. While the style guide is helpful, it can be difficult to navigate, so it has also been translated into a more easily readable Excel spreadsheet, which also available in the useful resources.
A CanTopo symbology guide is available for download and was used to help define the styles for the different layers used in this map. A link is available in the useful resources section at the bottom. The University of Toronto also hosts an old specifications guide, but as it is almost 14 years old it should not be assumed to be accurate. If you are looking for inspiration though, it is useful.
2. Example A: Building point locations
2a. Building Point Symbol
The Graphic style for the building symbols is a black square rotated to match the value in an orientation attribute. Using the CanTopo symbology guide a correctly sized square was created and then added to the symbol library.
2b. MAP Theme
A new Point Stylesheet MAP Theme was created called Buildings. The appropriate layer “bs_2010009_0” was added to the Theme and a rule was created named “All” as it will apply to all the building point locations. The Rule Expression is set to apply the Theme to all artwork as we want all the building points to look the same.
The Visual Properties tab was used to determine how the buildings would appear. The Symbol property was set to use the Building black square symbol created and added to the Symbol library earlier. The Rotation property was set to use the “orientatio” attribute. This ensures the buildings are oriented correctly.
Finally, and most importantly for the MAP Theme automation, the Auto-assign option was set so that any layer that matches the filename of the imported shapefile would automatically be styled using this theme.
3. Example B: Contours
3a. Contours Graphic Style
Two Graphic styles were created for the contours: one for the regular contours and one for the index contours at intervals of 100m. Both are grey, with the index contours slightly thicker (although it is hard to tell in the Graphic Styles panel.)
3b. MAP Theme
A Line Stylesheet MAP Theme was created called Contours. The layer “fo_1030009_1” was assigned to the MAP Theme. Two rules were created, one for index contours and one for regular contours. For the index contours, the Advanced Rule Expression builder is used to select any contour where the elevation is a multiple of 100, and the converse for the regular contours.
The Modulo (MOD) function makes this simple. For the index contours, the expression built as: “MOD(elevation,100)=0”. For the regular contours, the expression is “MOD(elevation,100)!=0”. The != operator means not equal to.
The Modulo function will be available with a future release of MAPublisher. If you are using an earlier version of MAPublisher, the same result for index contours can be had with this expression:
If you do try and apply this MAP Theme with an earlier version of MAPublisher without changing the equations, it will not work and you will get errors.
Each rule is assigned the appropriate graphic style applied in the Visual Properties. Creating Graphic Styles in advance is much easier than trying to remember specific stroke/colour combinations and makes them re-usable.
It is worthwhile organizing them in the Graphic Styles panel and naming the Graphic Styles appropriately so you can easily remember which is which later.
The layer is then set as auto-assigned so that when it is imported in the future this MAP Theme will automatically be applied.
4. Example C: Roads
4a. Graphic Style
The Roads layer is the most complex as there are multiple different classes of roads, that are then broken down into sealed and unsealed surfaces, and can be at grade, tunnels or bridges. Several of the road classes are assigned the same Graphic Style, so each style was named after a representative road class and assigned to several MAP Theme Rules.
4b. MAP Theme
There are defined styles of roads in the CanTopo specifications, but these do not map directly to the attributes that are present in the CanVec roads dataset. There are several attributes that hold information about the composition of the road, but the ones that were used to define the MAP Theme Rules were:
roadclass: a heirachy of road types
structype: defines if the road is a road, a bridge or a tunnels
pavstatus: contains information on the road surface, if it is paved or unpaved.
A Line Stylesheet Theme was created called Roads. The layer tr_1760009_1 was assigned to this Theme. Each road class has its own rule. The rule expression determine what class of road it is, if it is a bridge or a tunnel, and if it is paved or unpaved. An example of this is “Arterial: Paved: Bridge” with the expression:
roadclass=3 AND pavstatus=1 AND (structype =1 OR structype =2 OR structype =3 OR structype =4)
which simply says select art that is an Arterial Road (roadclass=3) is paved (pavstatus=1) and one of four different types of bridge (structype 1 through 4).
As in previous examples, each rule is assigned a Graphic Style in the Visual Properties tab.
The layer is set to auto apply on import.
Once rules are created and applied to all the imported layers the end result looks like this:
In addition to vector data, the GeoGratis portal has raster terrain data available for download. There are digital elevation models, digital surface models, and a variety of derived products such as slope and aspect. For this map we downloaded a hillshade and adjusted the opacity so it would blend with the map style. The forest cover layer and the built up areas layer also had their blending modes adjusted so the hillshade would show through.
The hillshade was downloaded in an unprojected geodetic coordinate system and Geographic Imager was used to transform it into the UTM projection used for this map.
6. Final words
In order for the defined MAP Themes to be automatically applied to any imported data, the imported layer filenames must match those defined in the MAP Theme Rules as discussed above. If you would like to try it out with your own CanVec data extract, do the following:
Download the “Canvec_Data_Themes.ai” file linked below for the version of Illustrator you are using. Have a look at the data structure, layer names and MAP View properties of this document.
Also download the appropriate “Canvec_Data_Themes_Empty.ai” file to use as a template.
Download an extract of CanVec data as shapefiles.
Use the Advanced Import functionality to import the shapefiles into the empty document. Reproject the map if desired.
The imported data have the styles applied automatically. However, you will probably have a few layers that have no style. Use the methods detailed above to create new styles for those layers.