Nội suy dữ liệu dạng điểm

Cảnh báo

This tutorial is now obsolete. A new and updated version is available at Interpolating Point Data (QGIS3)

Nội suy là một kỹ thuật GIS được sử dụng rộng rãi trong việc tạo lập bề mặt phẳng từ các điểm rời rạc. Một số hiện tượng thực tế có tính liên tục như - độ cao địa hình, thổ nhưỡng, nhiệt độ, v.v... Nếu muốn mô phỏng các bề mặt này để phân tích, việc đo đạc trực tiếp trên bề mặt là không thể. Do đó, các đo đạc thực địa được thực hiện ở nhiều điểm khác nhau trên bề mặt và các giá trị trung gian được tạo ra bởi quá trình nội suy. Trong QGIS, nội suy được thực hiện bằng công cụ được tích hợp sẵn Interpolation plugin.

Tổng quan về nhiệm vụ

Chúng ta sẽ tiến hành đo đạc độ sâu của hồ Arlington ở bang Texas và tạo bản đồ có độ cao địa hình cùng các đường bình độ từ việc đo đạc đó.

Các kỹ năng bạn sẽ học được

  • Tạo đường bình độ từ dữ liệu điểm.

  • Làm mặt nạ vùng không có dữ liệu 'no-data' từ lớp raster.

  • Tạo thêm nhãn cho lớp vector.

Nhận dữ liệu

Texas Water Development Board provides the shapefiles for completed lake surveys.

Tải dữ liệu điều tra Lake Arlington 2007-12 dạng shapefiles.

Để thuận tiện, bạn có thể tải trực tiếp các dữ liệu mẫu sử dụng trong tài liệu hướng dẫn này theo đường dẫn sau.

Shapefiles.zip

Nguồn dữ liệu: [TWDB]

Các bước thực hiện

  1. Mở QGIS. Vào Layer ‣ Add Layer ‣ Add Vector Layer..

../_images/1182.png
  1. Tìm tới file Shapefiles.zip đã tải xuống và chọn.. Bấm Open.

../_images/2148.png
  1. Trong Select layers to add... dialog, giữ nút Shift và chọn Arlington_Soundings_2007_stpl83.shp và lớp Boundary2004_550_stpl83.shp. Bấm OK.

../_images/385.png
  1. You will see the 2 layers loaded in QGIS. The Boundary2004_550_stpl83 layer represents the boundary of the lake. Un-check the box next to it in the Table of Contents.

../_images/453.png
  1. This will reveal the data from the second layer Arlington_Soundings_2007_stpl83. Though the data looks like lines, it is a series of points that are very close.

../_images/550.png
  1. Click the Zoom icon and select a small area on the screen. As you zoom closer, you will see the points. Each point represents a reading taken by a Depth Sounder at the location recorded by a DGPS equipment.

../_images/648.png
  1. Select the Identify tool and click on a point. You will see the Identify Results panel show up on the left with the attribute value of the point. In this case, the ELEVATION attribute contains the depth of the lake at the location. As our task is to create a depth profile and elevation contours, we will use this values as input for the interpolation.

../_images/747.png
  1. Make sure you have the Interpolation plugin enabled. See Using Plugins for how to enable plugins. Once enabled, go to Raster ‣ Interpolation ‣ Interpolation.

../_images/846.png
  1. In the Interpolation dialog, select Arlington_Soundings_2007_stpl83 as the Vector layers in the Input panel. Select ELEVATION as the Interpolation attribute. Click Add. Change the Cellsize X and Cellsize Y values to 5. This value is the size of each pixel in the output grid. Since our source data is in a projected CRS with Feet-US as units, based on our selection, the grid size will be 5 feet. Click on the ... button next to Output file and name the output file as elevation_tin.tif. CLick OK.

Ghi chú

Interpolation results can vary significantly based on the method and parameters you choose. QGIS interpolation supports Triagulated Irregular Network (TIN) and Inverse Distance Weighting (IDW) methods for interpolation. TIN method is commonly used for elevation data whereas IDW method is used for interpolating other types of data such as mineral concentrations, populations etc. See the Spatial Analysis module of the QGIS documentation for more details.

../_images/946.png
  1. Bạn sẽ thấy lớp elevation_tin mới được mở trong QGIS. Bấm chuột phải vào tên lớp và lựa chọn Zoom to layer.

../_images/1053.png
  1. Now you will see the full extent of the created surface. Interpolation does not give accurate results outside the collection area. Let's clip the resulting surface with the lake boundary. Go to Raster ‣ Extraction ‣ Clipper.

../_images/1183.png
  1. Name the Output file as elevation_tin_clipped.tif. Select the Cliiped mode as Mask layer. Select Boundary2004_550_stpl83 as the Mask layer`. Click OK.

../_images/1255.png
  1. A new raster elevation_tin_clipped will be loaded in QGIS. We will now style this layer to show the difference in elevations. Note the min and max elevation values from the elevation_tin layer. Right-click the elevation_tin_clipped layer and select Properties.

../_images/1353.png
  1. Go to the Style tab. Select Render type as Singleband pseudocolor. In the Generate new color map panel, select Spectral color ramp. As we want to create a depth-map as opposed to a height-map, check the Invert box. This will assign blues to deep areas and reds to shallow areas. Click Classify.

../_images/1449.png
  1. Switch to the Tranparency tab. We want to remove the black-pixels from our output. Enter 0 as the Additional no data value. Click OK.

../_images/1546.png
  1. Now you have a elevation relief map for the lake generated from the individual depth readings. Let's generate contours now. Go to Raster ‣ Extraction ‣ Contours.

../_images/1643.png
  1. In the Contour dialog, enter contours as the Output file for contour lines. We will generate contour lines at 5ft intervals, so enter 5.00 as the Interval between contour lines. Check the Attribute name box. Click OK.

../_images/1739.png
  1. The contour lines will be loaded as contours layer once the processing is finished. Right-click the layer and select Properties.

../_images/1837.png
  1. Tìm tới thanh Labels. Chọn hộp Label this layer with và lựa chọn trường ELEV. Chọn Curved là loại Placement và bấm OK.

../_images/1929.png
  1. You will see that each contour line will be appropriately labeled with the elevation along the line.

../_images/2024.png

If you want to report any issues with this tutorial, please comment below. (requires GitHub account)