Traffic network data is characterized by high complex spatiotemporal dependence and heterogeneity, which poses great challenges for traffic forecasting. To address this challenge, we propose a novel model framework, named Wavelet Based Sampling and Graph Convolutional Neural Network (WSG-CNN). To solve the problem of complex spatiotemporal dependencies in the data, we propose a method that combines sampling convolution and gated temporal convolution network (TCN) to extract temporal features. This model uses sampling convolution to improve the Receptive field of shallow network of TCN model, while using TCN to reduce the number of convolution layers, thereby effectively enhancing the ability of the model to extract temporal features by preserving the original temporal features while also deeply fusing them. We also integrate graph convolution network into the model to effectively handle the spatiotemporal dependencies of the data. Traffic data has heterogeneity, characterized by periodic and sudden features. To separate these two features from the frequency domain, we employ wavelet transform and add them to the original data for training. This expands the explicit features of the original traffic data and effectively improves the predictive ability of the model. Experiments are conducted on six public datasets, which demonstrates that our model achieves state-of-the-art performance over baseline models both on traffic flow forecasting and traffic speed forecasting. Our code and datasets are available on Github.