2

I'm trying to clip the CORINE Land Cover 10 ha Shapefile (https://gdz.bkg.bund.de/index.php/default/open-data/corine-land-cover-10-ha-clc10.html) with a district shapefile to get my investigation area. Thereby, I extracted the three relevant districts of my investigation from the original district shapefile (https://gdz.bkg.bund.de/index.php/default/verwaltungsgebiete-1-250-000-ebenen-stand-01-01-vg250-ebenen-01-01.html) with the following code:

 import geopandas as gpd districts_germany = gpd.read_file('C:/Users/lucas/Desktop/Master Thesis/Python/Data_New/District Data/vg250_01-01.utm32s.shape.ebenen/vg250_01-01.utm32s.shape.ebenen/vg250_ebenen_0101/VG250_KRS.shp') districts_fr_em_br = districts_germany.loc[[203, 204, 205], :] districts_fr_em_br.to_file('C:/Users/lucas/Desktop/Master Thesis/Python/Data_New/District Data/vg250_01-01.utm32s.shape.ebenen/vg250_01-01.utm32s.shape.ebenen/vg250_ebenen_0101/districts_fr_em_br.shp') 

Then I used the clip function in QGIS with the clc10 shapefile (green) as input layer and the created districts_fr_em_br shapefile (pink) as overlay layer. However, after clipping, some areas of the clipped clc10 shapefile (yellow) are missing. Both shapefiles have the same Coordinate Reference System.

enter image description here

enter image description here

It seems to be that polygons, which go beyond the district boundaries, are missing. Is there a way to cut these polygons at the boundary? However, I think also polygons, which are not crossing the border, are missing. Thus, I'm not sure if this is the problem. I also tried to convert the MultiPolygons to Polygons and clip it afterward. But the same areas are missing.

1 Answer 1

2

My solution to the problem was to rasterize the clc shapefile using Raster > Conversion > Rasterize in QGIS. Thereby, I had to change the data type of column clc to int. Then I clipped the raster file to my district boundaries districts_fr_em_br using Raster > Extraction > ClipRasterbyMaskLayer in QGIS. Afterwards, I polygonized it again to avoid the missing areas using Raster > Conversion > Polygonize.

enter image description here

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.