| 78 | |
| 79 | |
| 80 | PointViewSet ShellFilter::run(PointViewPtr view) |
| 81 | { |
| 82 | log()->get(LogLevel::Debug) << "running command : '" << m_command << "'"<< std::endl; |
| 83 | |
| 84 | int status = Utils::run_shell_command(m_command.c_str(), m_command_output); |
| 85 | if (status) |
| 86 | { |
| 87 | std::stringstream msg; |
| 88 | msg << "Command '" << m_command << "' failed to execute"; |
| 89 | msg << " with output '" << m_command_output <<"'"; |
| 90 | throw pdal::pdal_error(msg.str()); |
| 91 | |
| 92 | } |
| 93 | |
| 94 | log()->get(LogLevel::Debug) << "command output: '" << m_command_output << "'"<< std::endl; |
| 95 | log()->get(LogLevel::Debug) << "status: '" << status<< "'"<< std::endl; |
| 96 | |
| 97 | PointViewSet views; |
| 98 | views.insert(view); |
| 99 | return views; |
| 100 | } |
| 101 | |
| 102 | |
| 103 | |