Function tryStandardUtmZone
Select the standard UTM zone and hemisphere for a geographic coordinate.
bool tryStandardUtmZone(T)(
const GeographicCoordinate!T source,
out UtmZone zone,
out UtmHemisphere hemisphere
) pure nothrow @nogc @safe
if (isGeodesyScalar!T);
The automatic latitude domain is -80 degrees inclusive to +84 degrees exclusive. Longitude is canonicalized to the principal half-open interval before zone selection. Norway and Svalbard exceptions are applied. Latitude zero uses the northern false-northing convention.
Parameters
| Name | Description |
|---|---|
| source | Geographic coordinate used for automatic policy selection. |
| zone | Receives the selected UTM zone. |
| hemisphere | Receives the north/south false-northing convention. |
Returns
true inside the standard automatic UTM latitude domain; false
outside it.
Example
Example using bool tryStandardUtmZone(T)( const GeographicCoordinate!T source, out UtmZone zone, out UtmHemisphere hemisph.
import geodesy;
const vienna = GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208));
UtmZone zone;
UtmHemisphere hemisphere;
assert(tryStandardUtmZone(vienna, zone, hemisphere));
assert(zone .number == 33);
assert(hemisphere == UtmHemisphere .north);