#include #include #include #include #include namespace mbgl { RasterDEMTileWorker::RasterDEMTileWorker(const ActorRef&, ActorRef parent_) : parent(std::move(parent_)) {} void RasterDEMTileWorker::parse(const std::shared_ptr& data, uint64_t correlationID, Tileset::DEMEncoding encoding) { if (!data) { parent.invoke(&RasterDEMTile::onParsed, nullptr, correlationID); // No data; empty tile. return; } try { auto bucket = std::make_unique(decodeImage(*data), encoding); parent.invoke(&RasterDEMTile::onParsed, std::move(bucket), correlationID); } catch (...) { parent.invoke(&RasterDEMTile::onError, std::current_exception(), correlationID); } } } // namespace mbgl