Function Repository Resource:

ToRDCoordinates

Source Notebook

Convert latitude-longitude coordinates to Dutch RD coordinates

Contributed by: Sander Huisman

ResourceFunction["ToRDCoordinates"][{lat,lon}]

converts the {lat,lon} coordinates to Dutch RD coordinates {x,y}.

ResourceFunction["ToRDCoordinates"][GeoPosition[]]

converts a GeoPosition to Dutch RD coordinates {x,y}.

Details and Options

ResourceFunction["ToRDCoordinates"] converts a latitude-longitude pair in the WGS84 datum to the Dutch RD coordinates (Rijksdriehoekscoördinaten) {x,y} using a fourth-order conformal mapping obtained from 6,000 reference points in the Netherlands.

Examples

Basic Examples (1) 

Convert an RD coordinate to a latitude-longitude pair:

In[1]:=
ResourceFunction["ToRDCoordinates"][{52.22`, 6.89`}]
Out[1]=

Scope (2) 

Use a GeoPosition object instead:

In[2]:=
ResourceFunction["ToRDCoordinates"][GeoPosition[{52.22, 6.89}]]
Out[2]=

Or a GeoPosition containing multiple coordinates:

In[3]:=
ResourceFunction["ToRDCoordinates"][
 GeoPosition[{{52.22, 6.89}, {51.22, 5.89}, {53.1, 6.1}}]]
Out[3]=

Applications (1) 

Find the RD coordinates for Amsterdam:

In[4]:=
latlonams = QuantityMagnitude[{Entity[
      "City", {"Amsterdam", "NoordHolland", "Netherlands"}][
     "Latitude"], Entity["City", {"Amsterdam", "NoordHolland", "Netherlands"}][
     "Longitude"]}];
ResourceFunction["ToRDCoordinates"][latlonams]
Out[5]=

Properties and Relations (1) 

Using ToRDCoordinates and the resource function FromRDCoordinates, we can convert to and from RD coordinates:

In[6]:=
ResourceFunction["FromRDCoordinates"][
 ResourceFunction["ToRDCoordinates"][{52.22, 6.89}]]
Out[7]=

Possible Issues (2) 

The coordinates are valid only within the border given by the following RD coordinates:

In[8]:=
bounds = {{141000, 629000}, {100000, 600000}, {80000, 500000}, {-7000,
     392000}, {-7000, 336000}, {101000, 336000}, {161000, 289000}, {219000, 289000}, {300000, 451000}, {300000, 614000}, {259000, 629000}};
GeoGraphics[
 Polygon[GeoPosition[
   ResourceFunction["FromRDCoordinates"] /@ bounds]]]
Out[8]=

Asking for coordinates outside this region—in this example, Brussels—spawns a message and extrapolates the fit:

In[9]:=
ResourceFunction["ToRDCoordinates"][{50.83`, 4.33`}]
Out[9]=

Publisher

SHuisman

Version History

  • 1.0.0 – 26 June 2019

Source Metadata

Related Resources

License Information