PHP: Convert ETRS89 UTM33 (EPSG: 25833) to WGS84 coordinates

raw

convert.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
// first:
// $ composer require php-coord/php-coord
 
require_once __DIR__ . '/vendor/autoload.php';
 
// EPSG 25833 is UTM 33 North, see https://epsg.io/25833
$UTMRef = new \PHPCoord\UTMRef(350531.8, 5689109.2, 0, 'N', 33);
$LatLng = $UTMRef->toLatLng();
 
echo (string) $UTMRef . "\n";
echo (string) $LatLng . "\n";
?>
 
raw

output.txt

33N 350531.8 5689109.2
(51.3336, 12.85437)
Christian Weiske Christian Weiske
owner

History