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

Method createTransform

filters/ReprojectionFilter.cpp:142–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void ReprojectionFilter::createTransform(const SpatialReference& srsSRS)
143{
144 if (m_inferInputSRS)
145 {
146 m_inSRS = srsSRS;
147 if (m_inSRS.empty())
148 throwError("source data has no spatial reference and "
149 "none is specified with the 'in_srs' option.");
150 }
151
152
153 // If either vector is empty, GDAL's default ordering is used.
154 if (m_inAxisOrdering.size() || m_outAxisOrdering.size())
155 {
156
157 m_transform.reset(new SrsTransform(m_inSRS,
158 m_inAxisOrdering,
159 m_outSRS,
160 m_outAxisOrdering));
161 } else {
162 m_transform.reset(new SrsTransform(m_inSRS, m_outSRS));
163 }
164
165
166 if (!pdal::Utils::compare_approx(m_inCoordEpochArg, 0.0f, 0.00f))
167 {
168 m_transform->setSrcEpoch(m_inCoordEpochArg);
169 }
170
171 if (!pdal::Utils::compare_approx(m_outCoordEpochArg, 0.0f, 0.00f))
172 {
173 m_transform->setDstEpoch(m_outCoordEpochArg);
174 }
175
176}
177
178
179PointViewSet ReprojectionFilter::run(PointViewPtr view)

Callers

nothing calls this directly

Calls 6

compare_approxFunction · 0.85
setSrcEpochMethod · 0.80
setDstEpochMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected