Well, no replies..But I got a bit further....So new question:
I have a gridded latitude longitude DEM, on this DEM I want to add the polygons I by now have substracted from the google earth kml file. But obviously the polygon does not match the coordinates of the grid. What would you people advise to do in order to add the polygon data (make the places at where there is a polygon (in which the DEM falls within the polygons) a NaN)? Interpolating every polygon line point on the grid is too numerically expensive I presume, in my case.