I have a vector layer containing landmark buildings in Stockholm. Each landmark building consists out of several features with the same KOM_ID but with different Z-values. When rasterizing this shape the building height (z-value) gets wrong due to the fact that multiple features with the same geometry overlap. For example the selected area below consists out of two features, one 61 and the other 37 meters above sea level. When rasterizing the z-value becomes 37, but only the value 61 is correct/relevant for me.
How can I "clean-up" this shape to get rid of duplicate overlapping features, keeping only the feature with the highest z-value (z-value marked with red circles below and named "hojd")
Download the shapefile here.