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.

enter image description here

  • do you know Raster Calculator ? If your result is a Raster, you can perform a new analysis to get output with the highest z-value for each cell. Commented Sep 25, 2017 at 10:19
  • I've added the shape file above. The problem is that when I rasterize the file, only the value 37 gets written to the raster, not 61. So I figured I need to solve this while still in vector?
    – johlund
    Commented Sep 25, 2017 at 10:21
  • 1
    ok you are right. You have to send all your file with the name globen to share your shapefile (.dbf, shx, prj ...) Commented Sep 25, 2017 at 10:26
  • No, actually you are right. SAGA GIS rasterize function lets you decide what to do if multiple values where found. Thanks for the idea.
    – johlund
    Commented Sep 25, 2017 at 10:32
  • great to know, happy to know I helped you Commented Sep 25, 2017 at 10:56

1 Answer 1


I solved it using SAGA GIS rasterize function that lets you decide what to do if multiple values where found. Then I chose to keep the maximum value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.