diff --git a/io/BpfReader.cpp b/io/BpfReader.cpp index 5a08897213..62050ffa04 100644 --- a/io/BpfReader.cpp +++ b/io/BpfReader.cpp @@ -135,6 +135,21 @@ void BpfReader::initialize() Utils::toString(zone)); code += (zone < 10 ? "0" : "") + Utils::toString(zone); } + else if (m_header.m_coordType == static_cast(BpfCoordType::TCR)) + { + // TCR is ECEF meters, or EPSG:4978 + // According to the 1.0 spec, the m_coordId must be 1 to be + // valid. + if (m_header.m_coordId == 1) + code = std::string("EPSG:4978"); + else + { + std::ostringstream oss; + oss << "BPF has ECEF/TCR coordinate type defined, but the ID of '" + << m_header.m_coordId << "' is invalid"; + throwError(oss.str()); + } + } else { // BPF supports something called Terrestrial Centered Rotational