3

I am using QGIS 2.14 Essen. I am working on ocean data points and I would like to interpolate them to create a raster. The problem is, when I do the interpolation, the areas where there is land are also filled with data. What I want to do is to interpolate the data only on the oceans area and not on land. I want the land areas to remain with no data.

Is there anyway to this?

Fezter
  • 21,867
  • 11
  • 68
  • 123
paleonoob
  • 107
  • 1
  • 7
  • 1
    Why not rasterise your land polygons? Then, with conditional calculations, wherever your interpolated raster overlaps a land pixel, set it to no data. – Fezter Dec 01 '16 at 06:49
  • I am very new to GIS so this is very helpful. Thank you. Maybe you could put it as an answer, so I could accept it as a useful answer. Thanks a lot. – paleonoob Dec 01 '16 at 07:33

1 Answers1

2

One way you could do this is to rasterise your land polygons and perform a conditional calculation so that the land pixels are set to No Data.

  1. Convert Vector to Raster

    enter image description here

    Your input file name is your land polygon file. enter image description here

  2. Use conditional statements in raster calculator to convert the land raster to null values and all other pixels will be your interpolated raster. I don't use QGIS often enough to know the exact workflow for this. But there are plenty of posts on this site to get you started. Like this one. Or alternatively you can use a mask which is described on the page for the raster calculator. You'd mask out your land pixels.

Fezter
  • 21,867
  • 11
  • 68
  • 123