## Introduction

OziExplorer is my favorite tool for working with topographical maps. Even in this era of mobile apps with all kind of online maps, I am a bit old fashioned by having my own collection of maps and OziExplorer is a great way to use them.

I am a Dutchy and here in the Netherlands the ‘authorities’ that are responsible for Dutch topographic maps use the Rijksdriehoeksmeting (RD) Map Datum.

In this blog we look at the Dutch maps and describe how to get them properly working in OziExplorer.

## Projection and Map Datum

### Amersfoort/RD New aka EPSG:28992

First a bit of generic introduction about maps. When ‘mapping’ the real world (yes, the globe) on 2D maps and identifying coordinates we need two major principles:

- Projection

How to image the sphere or ellipsoid on a 2D plane - Map Datum

How to define coordinates on sphere/ellipsoid and correspondingly on the 2D plane

For Rijksdriehoeksmeting the EPSG:28992 (Amersfoort/RD new) standard is used. This standard defines the Projection as well as the Map Datum.

The ESPG site summarizes the standard in a bit of a cryptic way:

`PROJCS["`**Amersfoort / RD New**",
GEOGCS["Amersfoort",
DATUM["Amersfoort",
SPHEROID["**Bessel 1841**",6377397.155,299.1528128],
TOWGS84[565.4171,50.3319,465.5524,1.9342,-1.6677,9.1019,4.0724999999]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4289"]],
PROJECTION["**Oblique_Stereographic**"],
PARAMETER["latitude_of_origin",**52.1561605555556**],
PARAMETER["central_meridian",**5.38763888888889**],
PARAMETER["scale_factor",0.9999079],
PARAMETER["false_easting",**155000**],
PARAMETER["false_northing",**463000**],
UNIT["metre",1],
AXIS["Easting",EAST],
AXIS["Northing",NORTH],
AUTHORITY["EPSG","28992"]]

### Projection

The earth (geoid) is approximated by means of an ellipsoid. For RD an ellipsoid called **Bessel 1841** is used. Note that this is another ellipsoid than that is used for **WGS84** (widely used for GPS). A point on earth can be defined with respect to this ellipsoid by means of (φ, λ, h). φ is the latitude, λ the longitude and h the height. Usually an ellipsoid with two axes is used: the long axis a at the equator, the short axis b pointing to the poles.

We discern the *geocentric *latitude φ’ (angle of the line through the center of the Ellipsoid with the equatorial plane) and the *geodetic *latitude φ (the angle of the line perpendicular to the surface with the equatorial plane). The later is usually used as the latitude value of the coordinate.

Note that φ’ = arctan[(1-e^{2})tan(φ)], where e is the excentricity of the ellipsoid and φ and φ’ are in radians.

As in the case of WGS84, the WGS84 ellipsoid represents the entire geoid. Since the geoid isn’t nice and smooth, sometimes a local ellipsoid is used to represent a local region. The Bessel1841 ellipsoid is such a local ellipsoid. As we will see a Map Datum Transformation is required when converting RD coordinates to WGS84 coordinates. This transformation consists of scaling, rotation and translation (of the center). It is defined as ‘TOWGS84’ in the above ESPG summary as 7 factors.

The projection of this point to a 2D map plane consists of two conformal projections (Schreiber double projection):

- Projection of the ellipsoid on a sphere with radius R = 6382644.576 m
- Projection of the sphere on a plane.

For the second projection the **oblique stereographic** projection is used, which means it is stereographic, under and angle. A point on earth is projected on a plane. The center of the plane coincides with the coordinate [52.1561605555556, 5.38763888888889], which is the spike of tower of the Onze Lieve Vrouwe church in Amersfoort. This is roughly the center of the Netherlands.

The plane is not tangent to the surface of the sphere, but lies slightly downwards. To be specific: the distance to the point of projection P is 2kR, where k=0.9999079. This is done to minimize the projection errors throughout the Netherlands. The intersection of the plane with the sphere is a circle around Amersfoort with a radius of r=122.5 km. Note: r = R (1-(2k-1)^{2})^{1/2}.

As we will see in a few moments the Transverse Mercator projection can also be used.

### Map datum

The Map Datum defines the coordinate system of the map. For RD coordinates are defined as [x, y], where x and y are Easting resp. Northing and expressed in meter. In the old days the origin [x,y]=[0,0] was the tower in Amersfoort, in the recent RD definition it is measured to a point near Paris: the tower in Amersfoort is 155000 m east to this point and 463000 m to the north. This makes the coordinate of the tower [x,y]=[155000, 463000]. The advantage of this ‘*false origin*‘ is that coordinates in the Netherlands are all positive and x and y cannot be interchanged since their ranges do not overlap.

### Reference points

Around 1900 a number of reference points (about 140) have been defined, usually church towers which are visible in the surrounding area, covering the country. These ‘first order’ points are shown in the picture above. Later on these points were extended with about 3000 second and third order points. Coordinates have been measured with a cm accuracy.

A set of 96 ‘kernnetpunten’ which have been measured with high accuracy can be donwloaded at PDOK. (These reference points are depicted on the PDOK maps as red triangles with a black dot in it.)

The full set of 4478 reference points is available at PDOK as ‘RD Info’ dataset. They provide the datasets as free web services without the need for authentication: WMS and WFS, so they can be easily integrated in software like QGis (which is a marvelous Open Source project by the way). It took me quite some time for me to find out how it worked. The ‘RD Info’ set contains **two data sets**: ‘**punten**‘ and ‘**stations**‘. A ‘**punten**‘ member is a named reference point, for example ‘O.L. Vrouwetoren Amersfoort’. For each reference point (in ‘**punten**‘) there are multiple coordinates exactly measured, which are in the second data set ‘**stations**‘, for example ‘Stang boven knop’. The relation between a ‘**punten**‘ member and the corresponding ‘**stations**‘ members is by the fields ‘blad’ and ‘punt’. It is important to note that the coordinates in the ‘punten’ data set is the average of the coordinates of the corresponding stations, rounded to 1 m!! The For example, the ‘OLV Toren in Amersfoort’, the origin of RD, is at [155029, 463001]. Of course the tower itself is at [155000, 463000], by definition.

I wrote software that downloads both data sets and creates a set of reference points (as Ozi waypoint file) consisting of the reference points to which the coordinates have been added of the associated station with the lowest ‘station’ field value (this usually is the reference point itself). The name of the Ozi waypoint is ‘[punt name] – [station name] – [year of measurement station]’, for example ‘O.L. vrouwetoren Amersfoort – Stang boven knop – 2012’

Download:

The 96 Kernnetpunten as OziExplorer waypoint file

All 4478 reference points as OziExplorer waypoint file (06-10-2023)

### WGS84 and Rijksdriehoeksmeting

WGS84 is one of the most popular Map Datums that is used for mapping the world. It is normally used by GPS devices. In order to convert between WGS84 coordinates and Rijksdriehoeksmeting coordinates and vice versa, a method is described by [2]. I wrote a small Java application for demonstrating the method. Refer to my Github project MapDatumConvert. Next diagram from [2] shows the process.

First easting, northing and height (NAP) are converted to latitude, longitude and height with respect to the Bessel 1841 ellipsoid. This step is the domain of Map Projection, in casu the Oblique Stereographic projection. The remaining steps are conversion of Map Datum: The latitude/longitude/height coordinates are converted to Carthesian coordinates [X, Y, Z]. The Carthesian coordinates are converted to WGS84 Carthesian coordinates (Datum Transformation by rotation and translation). The WGS84 Carthesian Coordinates are converted to latitude, longitude and height with respect to the WGS84 ellipsoid. Reference [3] also describes the transformation quite well.

## OziExplorer

### Ozi

OziExplorer is a versatile program using offline maps and offering loads of features. It can be used for routing, waypoints, tracks, etc. It supports a wide variety of map datums and projections. Though I use it for off-line maps, it can be used for online maps as well.

### The map

Maps in OziExporer consists of two files:

- The image file

Can be an regular image like .jpg, .png, .tiff but also optimized OziExplorer formats, like .ozf3 or ozf4. Using the latter format allows for really large maps, for example the full Netherlands on 1:25000 scale. - The map file

This metadata file defines the parameters for using the map. The OziExplorer help page describes the format of this text file. An example is shown below. Note that a number of PointNN lines have been omitted and replaced by ‘…’

```
OziExplorer Map Data File Version 2.2
AMERSFOORT - RD - transverse mercator
J:\temp\navigation\32b-top25raster-2019.tif
1 ,Map Code,
```**Rijksdriehoeksmeting**,WGS 84, 0.0000, 0.0000,WGS 84
Reserved 1
Reserved 2
Magnetic Variation,,,E
Map Projection,**Transverse Mercator**,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No
Point01,xy, ** 0, 0**,in, deg, , ,N, , ,W, grid, , **150000, 475000**,N
Point02,xy, **8000,10000**,in, deg, , ,N, , ,W, grid, , **160000, 462500**,N
Point03,xy, , ,in, deg, , ,N, , ,W, grid, , , ,N
...
**Projection Setup, 52.156160556, 5.387633333, 0.999907900, 155000.00, 463000.00, 0.000000000, 0.000000000,,,**
Map Feature = MF ; Map Comment = MC These follow if they exist
Track File = TF These follow if they exist
Moving Map Parameters = MM? These follow if they exist
**MM0,Yes
MMPNUM,4
MMPXY,1,0,0
MMPXY,2,8000,0
MMPXY,3,8000,10000
MMPXY,4,0,10000
MMPLL,1, 5.314383, 52.264005
MMPLL,2, 5.460884, 52.264005
MMPLL,3, 5.460700, 52.151643
MMPLL,4, 5.314567, 52.151643
MM1B,1.249346**
LL Grid Setup
LLGRID,No,10 Sec,Yes,255,16711680,0,No Labels,0,16777215,7,1,Yes,x
Other Grid Setup
GRGRID,Yes,100 m,No,13726235,13684944,Labels,0,16777215,8,1,Yes,No,No,x
MOP,Map Open Position,0,0
MOPLL,Map Open Position,0.0000000,0.0000000,125
IWH,Map Image Width/Height,8000,10000
MLP,Map Last Position,52.1572615,5.3940640,125

Following lines in the map file are relevant for properly configuring the map for Rijksdriehoeksmeting:

- Map datum (line 5)
**Rijksdriehoeksmeting**,WGS 84, 0.0000, 0.0000,WGS 84

The first parameter must be set to ‘Rijksdriehoeksmeting’. The other parameters are used for datum shift and not further explained in the help page of OziExplorer. - Map projection (line 9)
**Map Projection,Transverse Mercator**,PolyCal,No,AutoCalOnly,No,BSBUseWPX,No

We would have expected here a*Stereographic projection*. However, OziExplorer does not seem to support that properly. A*Transverse Mercator projection*apparently comes close enough to be useable. This is a cylindrical projection. OziExplorer supports this, including the scale factor k. - Projection setup
…**Projection Setup, 52.156160556, 5.387633333, 0.999907900, 155000.00, 463000.00,**

The second parameter is the longitude of the central meridian, which in our case passes through the Onze Lieve Vrouwe church tower in Amersfoort. The first parameter is the latitude of the tower on this meridian. Note that the latitude and longitude are according to the Map Datum (Rijksdriehoeksmeting) and this Map Datum uses the Bessel 1841 Ellipsoid. So these angles are according to this Ellipsoid.

The third parameter is the scaling factor k, responsible for lowering the projection cylinder into the earth.

Fourth and fifth parameters are the parameters for false easting and false northing (the shift of the origin). The values of the RD are used: 155000 m for easting, 463000 m for northing. - Reference Points (Point<NN>)

These are reference points on the map (pixel coordinates) together with the coordinates according to the Map Datum (RD easting,northing). For Dutch 1:25000 maps usually two coordinates (top left, bottom right) suffice. - Moving Map (MM) parameters

These parameters are used for displaying the next map when you scroll outside the map borders. These parameters are also used for OziExplorer MapMerge.

MMPXY defines the image coordinate in pixels and MMPLL the latitude/longitude coordinates in degrees with reference to the Bessel 1841 ellipsoid.

As is shown below the result is good on the PDOK map of Amersfoort, scale 1:25000: coordinates in degrees (Bessel 1841) as well as [X,Y] coordinates are correctly displayed. The 100 m grid (shown in white) coincides with the 1000 m grid on the map image file (shown in black).

Note:

OziExplorer also has a Map Datum ‘RD’ for Rijksdriehoeksmeting, to be used as first parameter on line 5 of the map file. However, in order for this to work there must be a file **datums.dat** present in the OziExplorer directory with the ‘magical’ contents:

RD, 3, 593, 26, 478

If this file is not present, coordinates do not make sense.

Note:

OziExplorer also has a representation of the ‘Dutch Grid’, which you can use at map calibration (see image below). For the latitude of the origin of the map 0° is used, which is the equator. In order to have the false northing on 463000 m, a value of -5316592 m must be added to the coordinates.

This results in a projection setup in the .map file accordingly:

Projection Setup, 0.000000000, 5.387633333, 0.999907900, 155000.00, -5316592.00, …

Note:

Be sure to set the Display Datum to ‘Datum of Loaded Map’. In this way the coordinates (latitude,longitude as well as easting,northing) and the user grid are displayed according to the Map Datum defined in the .map file (in casu: ‘Rijksdriehoeksmeting’). If you set it to WGS84 for example, coordinates are displayed according to this datum and grids are no longer coinciding with the RD grid. The settings is quite well hidden behind a small button on the right side at the top of the screen (image below).

### Grids

It is possible to add two grids to the maps:

- Lat/Lon grid, that coincides with the lat/lon coordinates of the Map Datum/spheroid
- User grid, that coincides with the user coordinates (northing and easting)

This section shows how to setup the User Grid. Prerequisite is that you use maps with the Rijksdriehoeksmeting Map Datum, otherwise the User Grid does not make sense.

First define the User Grid under *File* -> *Configuration*, under the *Maps* tab. Select *User Grid* from the drop down and click the symbol on its right. In the pop-up the same values are displayed as are defined in the loaded map. Note that this is an OziExplorer setting and does not affect the .map file.

Select from the menu *Map* -> *Grid Line Setup*.

Use the tab *Other Grid* and select the grid Line Interval. In this example we choose an interval of 100 m (the 1:25000 maps have a 1 km grid). Choose the appropriate colors. Note that the settings you make are written to the .map file. Shown below is the Grid Setup section in the .map file that corresponds to the settings above. So if you have multiple maps, you have to define the grid to each map in this way.

```
LL Grid Setup
LLGRID,Yes,10 Sec,Yes,255,16711680,0,No Labels,0,16777215,7,1,Yes,x
Other Grid Setup
GRGRID,Yes,100 m,No,14737632,13684944,Labels,0,16777215,8,1,Yes,No,No,x
```

In this way we end up with a grid on the map that perfectly coincides with the grid lines on the maps.

### Map Datum and Projection revisited

Most GPSes apply the widely used WGS84 as Map Datum. So when using GPS coordinates, waypoints, etc you might like to use WGS84 iso. Rijksdriehoeksmeting as Map Datum on the Dutch maps.

Reference points

We first present some reference points: the map origin which is the OLV in Amersfoort ([155000.0, 463000.0]) and the Martinitoren in Groningen (RD Info coordinate [233882.9, 582065.2]), which is about 143 km from the OLV. We started with the RD coordinates and derived the others using MapDatumConvert.

WGS84 lat/lon | TMercator e/n | RD lat/lon | Stereogr. e/n | TMercator e/n | |

OLV, Amersfoort | 52.1551722° | 155000.0 m | 52.15616056° | 155000.0 m | 155000.0 m |

5.3872035° | 463000.0 m | 5.387638889° | 463000.0 m | 463000.0 m | |

Martinitoren, Groningen | 53.2193815° | 233877.1 m | 53.2204954° | 233882.9 m | 233877.0 |

6.5681938° | 582065.8 m | 6.5688032° | 582065.2 m | 582066.3 |

*Reference points*

In both projections we find for the OLV [155000, 463000] as easting/northing. This is not surprising, since we defined this as the origin of our projections.

Looking at the Martintoren, the difference between the WGS84 easting/northing and RD easting/northing is [-5.8 m, 0.6 m], or absolute 5.8 m. This mainly is due to the different projections. If we would use the transverse mercator projection using the RD mapdatum, we would end up with a difference of [-5.9 m, 1.1 m], or absolute 6.0 m. So small part of the difference is due to the map datum (different ellipsoids and ‘misallignment’ of the ellipsoids).

Accuracy

Since our TOP25 maps have a pixel size that correspond to order of magnitude of 1 meter. GPS positioning data is roughly accurate to ~5m. Therefore it would be nice if the accuracy of the map datum is about a one meters throughout the area of the Netherlands for practical use.

WGS84

In order to change the Map Datum we need to do two things

- Change the Map Datum

We set it from ‘Rijksdriehoeksmeting’ to ‘WGS 84’, as we might expect - Convert the Projection Parameters

This one we must not forget: the lat/lon of the origin defined above was according tot RD (Bessel 1841). Now we switch Map Datum we must convert the lat/lon of the origin accordingly since Oziexplorer does not do this automatically. We can use MapDatumConvert for this or any online conversion tool.

The resulting lines in the .map file will become:

```
...
WGS 84,WGS 84, 0.0000, 0.0000,WGS 84
...
Projection Setup,
```**52.1551722, 5.3872035**, 0.999907900, 155000.00, 463000.00, 0.000000000, 0.000000000,,,
...

We now validate the result. First we feed the reference coordinates to Oziexplorer as a waypoint file, defining the coordinates as WGS84 Lat/Lon. The result on the Oziexplorer map is depicted below:

Looking at **OLV **in Amersfoort we find the easting/northing to be [155000, 463000] for both Map Datums. This is what we might expect, since we defined this in the projections as the origin of our map.

In case of the **Martinitoren **we find the **WGS84 **easting/northing in close agreement (accurate to 1 m) with what we might expect, based on the Transverse Mercator Projection we defined above in the blue section. Given the Map Datum WGS84, we expect the WGS84 ellipsoid to have been used.

In the Rijksdriehoeksmeting the easting/northing of the Martinitoren in Oziexplorer deviates from the RD easting/northing: [233879, 582067] in Ozi, [233882.9, 582065.2] as the RD coordinates (verified with MapDatumConvert as well as an online tool). Ozi shows a deviation of roughly [-3 m, 2 m]. This might be due to the fact that Oziexplorer applies the *Transverse Mercator*, whereas RD prescribes *Oblique Stereographic*. When we calculate the easting/northing using the *Transverse Mercator* (based on Bessel 1841) we find [233877.0, 582066.3] which comes closer to the value of Oziexplorer ([2 m, <1 m]), but still slight deviation.

What we further observe is that the Datum conversion of the lat/lon coordinate from WGS84 to RD in Ozi results in slightly inaccurate values. For the Martinitoren we find in Ozi [53.220496°, 6.568823°] against the expected [53.2204954°, 6.5688032°]. If we remove this inaccuracy, we end up with [233884.2, 582065.3], which comes within [1.3 m, 0.1 m] to the value shown in Oziexplorer.

Despite this deviation, coordinates of waypoints, tracks, etc are shown in Oziexplorer on the right spot, I guess within 1 m accuracy. This is due to the fact that a scaling of the easting/northing is applied based on the reference points in the .map file.

Conclusion: It is important to note that the easting/northing displayed top left of the screen of Oziexplorer are *an approximation* of the RD coordinates, whether we use Rijksdriehoeksmeting or WGS84. This is mainly due to the fact that Oziexplorer uses the *Transverse Mercator* projection as approximation to the *Oblique Stereographic projection* required by RD (the latter projection does not seem to be supported by Oziexplorer). Another contribution to the deviation is due to small deviations in the Map Datum conversion from WGS84 to RD in Oziexplorer.

## References

- Het gebruik van Nederlandse Topografische kaarten (by prof. Lupardi)
- Wat is het Rijksdriehoekstelsel? (anonymous) Conversion formulas.
- Geodetic reference frames in the Netherlands
- Rijksdriehoekscoordinaten