What the X/Y (M/P) numbers on Portuguese military maps mean, where they come from and how to turn them into GPS positions safely.
In short: Portuguese military coordinates (M, P) are metres on the Datum Lisboa / Hayford-Gauss Militar grid, EPSG:20790. To get GPS latitude and longitude, the projection is reversed and the official DGT NTv2 grid shifts Datum Lisboa to ETRS89/WGS84, with about 0.1 m accuracy.
A grid made for the army
For most of the twentieth century the Portuguese Army's mapping service — the Serviço Cartográfico do Exército, today the Centro de Informação Geoespacial do Exército (CIGeoE), formerly IGeoE — published the Carta Militar de Portugal at 1:25 000. Its square grid is the “military grid” that people still find on old sheets, in reports, in land documents and in rescue or heritage records.
Positions on that grid are written as two distances in metres: M (the X value, measured eastwards) and P (the Y value, measured northwards). A value such as M = 186 878.12, P = 13 299.48 is therefore a point roughly 187 km east and 13 km north of the grid's false origin.
Datum Lisboa / Hayford-Gauss Militar (EPSG:20790)
The military grid is fully defined by three ingredients:
- Datum Lisboa — the classical Portuguese geodetic datum, oriented at the Castelo de São Jorge in Lisbon and computed on the Hayford (International 1924) ellipsoid.
- Gauss (Transverse Mercator) projection centred near the geodetic centre of the country: latitude 39°40′ N, and a central meridian 1° east of the Lisbon meridian (8°07′54.862″ W of Greenwich), scale factor 1.
- A false origin 200 km west and 300 km south of that centre. Adding 200 000 m to every X and 300 000 m to every Y makes all coordinates in mainland Portugal positive — convenient for soldiers working in the field.
In the EPSG registry this system is EPSG:20790 “Lisbon (Lisbon) / Portuguese National Grid”. The same datum and projection without the false origin is EPSG:5018 “Lisbon / Portuguese Grid New”: the two differ by exactly 200 000 m in X and 300 000 m in Y.
Quick check: mainland military coordinates are always positive, with X roughly between 80 000 and 370 000 m and Y between 0 and 580 000 m. Negative values or values in the millions point to another coordinate system.
How the conversion to GPS works
GPS receivers, phones and Google Maps use WGS84, which in Portugal is practically identical to the European system ETRS89. Going from the military grid to GPS involves two steps:
- Undoing the projection, which gives latitude and longitude on Datum Lisboa.
- Changing datum from Datum Lisboa to ETRS89. Datum Lisboa is offset from modern GPS by around a hundred metres, and the offset changes across the country.
For the second step this site uses the official NTv2 grid published by the Direção-Geral do Território (DGT), which models the local distortions of the old network (about 0.1 m accuracy). A 7-parameter Bursa-Wolf transformation is also available, but it can be off by several metres. See Portuguese coordinate systems explained for details.
Using coordinates from old military maps
- Read the map margin: it states the datum, the projection and often the grid used. Many sheets also print a UTM grid (ED50 or WGS84) in a different colour.
- Measure from the grid lines printed on the sheet, not from the edge of the paper.
- Coordinates read from a 1:25 000 map are rarely better than 10–25 m because of drawing and reading precision — far more than the conversion error.
- If a converted point lands in the sea or in Spain, the coordinate system or the order of the values is probably wrong.