|MapGazer – GPX files|
A GPX (Global Positions eXchange format) file is used for storing one or more marks (tracks, routes, waypoints, images, areas, and scales, or any combination of these). GPX files are often created by a GPS (Global Positioning System) device or smartphone application; MapGazer can create routes, waypoints, images, areas, and scales, and can load or save all marks from or to GPX files.
MapGazer can load the tracks, routes, waypoints, areas, and scales from one or more GPX files and display them as marks added to the map. All marks can be edited or deleted, and you can save either all the current marks or an individual mark to a GPX file. The properties of marks that can be edited and saved include their name, caption, colour, transparency, and link URL (Universal Resource Locator); some marks have additional properties (such as the Icon for a waypoint or the width of a scale).
Loading GPX files
To load a GPX file, use the Marks → Load marks from GPX file menu (or press the ‘L’ key). This will open a dialog which you can use to select the GPX file to open. Any tracks, routes, waypoints, and areas in the file will then immediately be marked on the map (you may have to change the map or move it for the marks to be in view, but MapGazer will attempt to centre the map on the newly-loaded marks).
Depending on the source of the GPX file, tracks, routes, waypoints, and areas may have a default (golden, brown, or red) colour or may have a colour selected at the time of recording or creation.
If you associate MapGazer with the file extension .gpx then opening a file with that extension will start MapGazer (if necessary) and load that GPX file.
The MapGazer package includes a sample map (MapGazer\MGMaps\SampleMap) and also a sample GPX track (with three waypoints) that shows the drive between two villages on that map (La Hermida and Bejes). You can load this from MapGazer\gpx\samples; see below for how this might appear in a MapGazer window.
All marks have associated status which will be shown (unless turned off – see General settings) at the top left of the screen whenever the cursor is over the mark. Right click on any mark for a pop-up menu of actions that can be carried out on the mark.
Saving to a GPX file
To save a GPX file, use the Marks → Save marks to GPX file menu item (or press the ‘s’ key). This will open a dialog which you can use to select or enter the GPX file to be written. All marks loaded and not deleted (or new marks) will then be written to the file, including the Scale and any modifications you have made to any marks. New or changed marks will be written with some cosmetic formatting; unchanged items are generally copied directly from the loaded GPX file.
You can also save an individual mark by right-clicking on it and using the Save ... to GPX file pop-up menu item.
When marks are saved to a GPX file a template GPX file is used for the header and footer data that envelop the data items. Normally this will be the default supplied by MapGazer, but you can also use your own custom template. For details, see MapGazer templates.
GPX file format
GPX files are ‘plain text’ files; they can be viewed and edited with a simple text editor such as Notepad. The data within a GPX file are marked-up using eXtensible Markup Language (XML), following an open standard documented at www.topografix.com/gpx/. Any characters that are not 7-bit ASCII are encoded using UTF-8; in addition, a small number of characters (e.g., ‘&’) are encoded as symbol entities or are treated as CDATA (please see the XML standard for more details).
The GPX markup rules allow the addition of extensions to the basic track, route, and waypoint data, and most applications that create GPX files do add various extensions. The extensions augment the data with additional features – for example, the colour to use for displaying a mark, or a tag that indicates that a route is to be treated as an area.
MapGazer uses the following extensions (special tags):
A MapGazer Area mark is a special case of Route with exactly five waypoints such that a ‘rectangle’ is formed. An Image is an Area with associated image data.
Here is an example of a simple GPX file with no metadata and no extensions:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <!-- A sample GPX file with just a waypoint. --> <gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.1" creator="MFC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"> <wpt lat="43.377226" lon="-4.839000"> <ele>370.381805</ele> <time>2014-07-02T14:33:03Z</time> <name>River sounds above Boriza</name> </wpt> </gpx>If a tag has no enclosed content (such as a track point) it can always be marked as an empty tag (instead of a start tag immediately followed by an end tag).
Sample GPX track and waypoints
Here is a screenshot showing the track and three waypoints loaded from the MapGazer sample GPX file; this shows a drive from La Hermida to Bejes. Note that the three waypoints could be changed from to or from an ‘X’, an icon, or a dot; see Using icons for more details.
|MapGazer and these web pages were written by Mike Cowlishaw; Please send me any corrections, suggestions, etc.|
All content Copyright © Mike Cowlishaw,
2014–2021, except where marked otherwise. All rights reserved.
The pages here, and the MapGazer program, are for non-commercial
records no personal information and sets no ‘cookies’.
However, statistics, etc. might be recorded by the web hosting
This page was last updated on 2020-08-21 by mfc.