My Account     Contact Us     Cart

Articles

Difference Between Lines and Tracks When Exporting from Avenza Maps

There are two methods of exporting GPS tracks from Avenza Maps in KML format: as a line and as a track. Which option to select depends on the intended purpose. Lines are much simpler than tracks and store only the position of each vertex in the line as latitude longitude and elevation. Tracks contain a complete description of how the path moves through space including the position at one-second intervals, the time at which each position was recorded, the compass angle of the heading, and the velocity. Lines take up much less storage space than tracks. To switch between exporting to Lines or Tracks, select Track Export in the Export Settings screen.

Export Settings screen

Tracks are useful in applications where the GPS position at a given time and space is important. For example, in Google Earth there is an option to record a tour that moves to predetermined places on the globe. This would be useful if you wanted to follow along on a hiking path or do a virtual walkthrough of a proposed building development. To make a tour from a track, open the KML file in Google Earth, select the track in the places panel, and click the Play Tour icon. The animation below shows a walk through Mount Pleasant Cemetery in Toronto, Canada. Lines contain only the location information: latitude longitude and elevation. Export to line when the time data is not important such as if you are making a map of a hiking trail.

Play tour in Google Earth
A tour of Mount Pleasant Cemetery in Toronto, Canada using Google Earth

KML Code for Lines and Tracks

KML (short for Keyhole Markup Language) is an XML notation for displaying spatial data in web applications. It was developed for use with Google Earth and can be read by many programs. Avenza Maps uses KML to import and export placemarks, lines, and tracks. You can view and modify KML files in any text editor. The KML element used for lines is called a Linestring which is defined as “a connected set of line segments”. A Linestring element contains a coordinates tag which is a list of longitude and latitude positions in decimal degrees and elevations in meters.

KML Linestring code sample

Tracks use the KML element “gx:Track” which contains several tags.

  1. when – the date and time a point was recorded in UTC
  2. gx:coord – the location of the point in decimal degrees and the elevation in meters
  3. gx:angle – the current heading in compass degrees (i.e. 0 degrees is north, 90 is degrees east and so on)
  4. gx:value tag defined as “speed” – the current speed in meters per second

There are equal numbers of each of these tags. A full description of the vertex includes all the tags in the same sequence. For instance, the first when tag, coord tag, angle tag, and speed tag, describe the first vertex in the track.

Track KML code sample

 

Exporting Photos From Avenza Maps For Use In ArcGIS

Avenza Maps Pro users can export layers to shapefile with associated photos. ArcGIS can display these photos using either hyperlinks or HTML popups. This post explains how to export your photos from Avenza Maps and display them in ArcGIS.

First, download and unzip these utilities. The general process for exporting and displaying photos is as follows:

  1. Export a shapefile with photos from Avenza Maps
  2. Unzip the exported files to your computer
  3. Open ArcGIS
  4. Add the shapefile to the map
  5. Save the map in the same folder as the shapefile
  6. Run the “Photo Shapefile Converter” tool
  7. Set the layer to display a hyperlinked photo and/or
  8. Set the layer to show an HTML popup

 

Exporting from Avenza Maps

First, export a layer that contains photos from Avenza Maps. Choose Shapefile (SHP) as the Export Format and ensure that Media Size is set to either Small, Medium or Large — don’t set it to No Photos. It is also possible with shapefile to set the Output Coordinate System to either WGS 84 (lat, long) or the native coordinate system of the map. The shapefile will export as a ZIP file with each of the component files of the shapefile and a folder called images.

Avenza Maps export settings

 

Display the photos in ArcGIS

Unzip the file on your computer and start a new session of ArcGIS. Load the shapefile into the map. Save the map document as an MXD in the same directory as your shapefile. The images folder should also be in this directory. The “Photo Shapefile Converter Script” creates fields with the path to the photos on your computer. It assumes the photos are in the same directory as the map. The script will not run if the map has not been saved.

Export folder

The shapefile has four attributes which are described below. The fields ‘name’, desc’, and ‘Photos’ have a maximum length of 254 characters. Because of this, ‘Photos’ can have a maximum of 13 photos.

  • name: From the placemark’s Title
  • desc: From the placemark’s Description
  • TimeStamp: The date the placemark was created
  • Photos: Relative paths to each associated photo separated by commas

Locate the Avenza Tools toolbox in the Catalog pane. Optionally, drag this toolbox to My Toolboxes for convenient access. Run the script Photo Shapefile Converter located in the Photos for Avenza Maps folder. Select the photo shapefile from the drop-down menu and click OK to run it. The script formats the shapefile to display photos using either a hyperlink or an HTML popup. Using the field ‘Photo’ as an input, it creates a field for each hyperlink (‘Photo1’, ‘Photo2’, etc.) and a field with the HTML code to display each photo in the HTML popup (‘HTML1’, ‘HTML2’, etc.)

Note: Photos exported from Android contain geotags and can be plotted in ArcGIS using the Geotagged Photos to Points tool. Photos exported from iOS do not have geotags.

 

Viewing Photos using a Hyperlink

Hyperlinked photos display in the default system viewer when the user clicks on the field in the info window or using the Hyperlink tool when a default field is set up.

  • Select the info tool and click a feature. Click on the lightning bolt icon and a photo will open in the default picture viewer
  • Open the layer’s properties and select the Display tab. Check “Support hyperlinks using field” and choose a field with a ‘Photo’ prefix (Photo1, Photo2, etc.). Click OK.
  • Select the Hyperlink tool from the ArcGIS toolbar. Click a feature and the associated image will open

 

Viewing Photos in an HTML Popup

To view as an HTML popup, open the layer properties and click “Show content for this layer using the HTML popup tool”, select “As formatted based on an XSL template”, and load the predefined XSL template ‘Avenza.xsl’. The XSL file determines how the HTML popup is formatted. Select the HTML popup tool (word bubble icon) from the toolbar and click a feature. The placemark’s title, description, and all associated photos are displayed in a callout.

Isolating and Displaying Specific Grid and Graticule Lines

MAPublisher Grids and Graticules is a powerful tool. There are dozens of settings to create an indexed grid, measured grid, or graticule exactly the way you want. We often receive questions about how to create certain grid and graticule styles and this was interesting. We were asked how to create a graticule to display a very specific latitude and longitude, perhaps even by itself (only a single line of latitude or longitude).

Creating a single graticule line

In this example, we’re going to create a graticule that will only display the Tropic of Capricorn at -23.4371 degrees (or 23.4371 degrees south of the equator).

On the MAPublisher toolbar, click the Grids and Graticules button to open the dialog box. Click the Graticules button to create one. On the Graticules Grid main settings, the important setting to note here is the Pass through section — it specifies lines of latitude and longitude that must be included in the graticule. Enter 30 deg Long and -23.4371 deg Lat. This means that a graticule line must pass through -23.4371 degrees latitude (the Tropic of Capricorn). The reason why a line at 30 deg longitude is specified is to hide it from the map view (it is placed at 30 deg longitude outside of the map extent).

Pass through setting

In the Intervals section, set 90 deg Latitude interval and 180 deg Longitude interval. Because the intervals are at the extreme, this means that the the only lines left to display are the ones specified in the Pass through section (30 deg long and -23.4371 deg lat). In this case, it will only display a single line of latitude (the Tropic of Capricorn) for the graticule.

Intervals setting

If you want to label the graticule, go to the Line Labels setting. Click the Lat and Lng on the grid label control to enable them. To control how many decimals are displayed, click the Format setting, then change the number of decimals to something greater than 0.

Label settings

To intersect single lines of longitude and latitude, adjust the Pass through setting so that the line is within the map’s extent. In this case, it was set to -50 deg (50 deg west).

Intersect single lines of longitude and latitude

Remember that you can share Grids and Graticules settings with anybody by clicking the Save Settings button, selecting a destination folder and sharing the configuration files.

Privacy Preference Center

TEST TAB

Track anonymous usage

tracking

Close your account?

Your account will be closed and all data will be permanently deleted and cannot be recovered. Are you sure?

Are you sure?

By disagreeing you will no longer have access to our site and will be logged out.