| 262 | // --------------------------------------------------------------------------- |
| 263 | |
| 264 | void PROJBasedOperation::_exportToPROJString( |
| 265 | io::PROJStringFormatter *formatter) const { |
| 266 | if (projStringExportable_) { |
| 267 | if (inverse_) { |
| 268 | formatter->startInversion(); |
| 269 | } |
| 270 | projStringExportable_->_exportToPROJString(formatter); |
| 271 | if (inverse_) { |
| 272 | formatter->stopInversion(); |
| 273 | } |
| 274 | return; |
| 275 | } |
| 276 | |
| 277 | try { |
| 278 | formatter->ingestPROJString(projString_); |
| 279 | } catch (const io::ParsingException &e) { |
| 280 | throw io::FormattingException( |
| 281 | std::string("PROJBasedOperation::exportToPROJString() failed: ") + |
| 282 | e.what()); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | // --------------------------------------------------------------------------- |
| 287 |
no test coverage detected