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

Method setSpatialReference

pdal/Reader.cpp:76–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75
76void Reader::setSpatialReference(MetadataNode& m, const SpatialReference& srs)
77{
78 if (srs.empty() && !m_defaultSrs.empty())
79 {
80 // If an attempt comes in to clear the SRS but we have a default,
81 // revert to the default rather than clearing.
82 Stage::setSpatialReference(m, m_defaultSrs);
83 return;
84 }
85
86 if (getSpatialReference().empty() || m_overrideSrs.empty())
87 {
88 Stage::setSpatialReference(m, srs);
89 }
90 else
91 {
92 log()->get(LogLevel::Debug) <<
93 "Ignoring setSpatialReference attempt: an override was set"
94 << std::endl;
95 }
96}
97
98
99void Reader::l_initialize(PointTableRef table)

Callers

nothing calls this directly

Calls 4

setSpatialReferenceFunction · 0.70
logFunction · 0.70
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected