MCPcopy Create free account
hub / github.com/PDAL/PDAL / wgs84FromZone

Method wgs84FromZone

pdal/SpatialReference.cpp:468–483  ·  view source on GitHub ↗

Create a spatial reference that represents a specific UTM zone. \param zone Zone number. Must be non-zero and <= 60 and >= -60 \return A SpatialReference that represents the specified zone, or an invalid SpatialReference on error. */

Source from the content-addressed store, hash-verified

466 an invalid SpatialReference on error.
467*/
468SpatialReference SpatialReference::wgs84FromZone(int zone)
469{
470 uint32_t abszone(std::abs(zone));
471
472 if (abszone == 0 || abszone > 60)
473 return SpatialReference();
474
475 std::string code;
476 if (zone > 0)
477 code = "EPSG:326";
478 else
479 code = "EPSG:327";
480
481 code += ((abszone < 10) ? "0" : "") + Utils::toString(abszone);
482 return SpatialReference(code);
483}
484
485
486bool SpatialReference::isWKT2(const std::string& wkt)

Callers

nothing calls this directly

Calls 2

SpatialReferenceClass · 0.70
toStringFunction · 0.50

Tested by

no test coverage detected