Skip to content

Instantly share code, notes, and snippets.

View thomasorten's full-sized avatar

Thomas Orten thomasorten

View GitHub Profile
@thomasorten
thomasorten / gist:9f824eac619cebe2f322
Created January 23, 2015 09:12
main.css i gatelys-app
/* Generelle stiler */
body, html {
height: 100%;
background: #000;
}
body > div, .row, .info {
height: 100%;
}
@thomasorten
thomasorten / UTMtoLatLon.php
Created July 18, 2013 20:12
Convert UTM northing/easting to latitude and longitude.
<?php
// Original source from Steven Dutch, https://www.uwgb.edu/dutchs/UsefulData/ConvertUTMNoOZ.HTM
// Rewritten by Thomas Orten
function UTMtoLatLon ($input_lat, $input_long, $utm_zone, $south_of_equator = false) {
$DatumEqRad = array(6378137.0, 6378137.0, 6378137.0, 6378135.0, 6378160.0, 6378245.0, 6378206.4, 6378388.0, 6378388.0, 6378249.1, 6378206.4, 6377563.4, 6377397.2, 6377276.3);
$DatumFlat = array(298.2572236, 298.2572236, 298.2572215, 298.2597208, 298.2497323, 298.2997381, 294.9786982, 296.9993621, 296.9993621, 293.4660167, 294.9786982, 299.3247788, 299.1527052, 300.8021499);
$Item = 0; // Default
$k0 = 0.9996; // scale on central meridian