Skip to content

Commit

Permalink
support ECEF for readers.bpf when the file SRS is defined correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Mar 5, 2018
1 parent 2883c08 commit ae4cd47
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions io/BpfReader.cpp
Expand Up @@ -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<int>(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
Expand Down

0 comments on commit ae4cd47

Please sign in to comment.