官术网_书友最值得收藏!

Creating raster overviews (pyramids)

Overviews, or pyramids, and resampling are all about making raster layers load faster when zooming and panning in your map canvas, by reducing the amount of data loaded when not zoomed in all the way.

Getting ready

You will need a large raster image.

Tip

Generally, you want to make a copy of the data as this method will likely alter the original file if you choose to make 'internal' pyramids (easy to do on accident).

How to do it…

  1. Load your raster in QGIS. elev_lid792_1m.tif will work fine for this example.
  2. Right-click on the layer name and open Properties.
  3. Go to the Pyramids item on the left:
    How to do it…
  4. Select the image sizes that you want to create pyramids for:
    • Optionally, choose whether to store externally (safer) or internally (less files to keep track of).
    • Optionally, choose a resampling algorithm; Nearest Neighbor is the simplest, but other methods may look smoother at the cost of more data manipulation and compute time
  5. Click on Build pyramids.
  6. When this is completed, you'll notice the red X on the sizes that you picked will now show a pyramid.

How it works…

Generating pyramids essentially makes copies of your original data resized for different zoom levels. As you zoom out, the original data is resampled to fit the size of the screen. The pyramids do the same thing, but they let you decide what resampling method to use and generate this overview ahead of time. By generating them ahead of time, QGIS can load the image faster when you change zoom levels.

There's more…

Resampling is a fancy way of saying that at each zoom level that is now 1 pixel is more than 1 pixel from the original data, so they need to be averaged in some way and the result assigned to the 1 pixel that is now available. Each of the different methods uses a different math formula to decide the new value and how much to smooth that value with neighboring pixels (so that it looks aesthetically pleasing). This is the same concept as when you shrink pictures so that you can e-mail them to your friends.

If you chose to save them externally, your overviews are stored in elev_lid792_1m.tif.ovr. Some other programs store the same thing in the .aux files; however, pyramid formats are not universally compatible between GIS applications.

See also

主站蜘蛛池模板: 九寨沟县| 德昌县| 东山县| 北京市| 威远县| 沙坪坝区| 惠州市| 农安县| 望谟县| 崇明县| 宾川县| 建宁县| 富蕴县| 宁国市| 潜江市| 循化| 岑溪市| 旬邑县| 渝北区| 汽车| 赣榆县| 永兴县| 三穗县| 阿拉尔市| 克什克腾旗| 荆门市| 石阡县| 澄迈县| 贵港市| 闽侯县| 通州市| 墨江| 汝南县| 南靖县| 滦南县| 弥勒县| 沂南县| 明水县| 汝城县| 东丽区| 古蔺县|