| 153 | |
| 154 | |
| 155 | bool CropFilter::processOne(PointRef& point) |
| 156 | { |
| 157 | for (auto& g : m_geoms) |
| 158 | for (auto& gridPnp : g.m_gridPnps) |
| 159 | if (crop(point, *gridPnp)) |
| 160 | return true; |
| 161 | |
| 162 | for (auto& box : m_boxes) |
| 163 | if (box.is3d()) |
| 164 | { |
| 165 | if (crop(point, box.to3d())) |
| 166 | return true; |
| 167 | } |
| 168 | else |
| 169 | { |
| 170 | if (crop(point, box.to2d())) |
| 171 | return true; |
| 172 | } |
| 173 | |
| 174 | |
| 175 | for (auto& center: m_args->m_centers) |
| 176 | if (crop(point, center)) |
| 177 | return true; |
| 178 | |
| 179 | return false; |
| 180 | } |
| 181 | |
| 182 | |
| 183 | void CropFilter::spatialReferenceChanged(const SpatialReference& srs) |