I have mesh data of elevations. Each mesh has a value of elevation (e.g. 87, 60, 33, ...).


And I also have data of administrative boundaries.


I want to calculate the average of each administrative area's elevation, but I don't know how to connect two shapefiles (mesh data and boundary data) because these two are different shape.

Could someone tell me how to?


You need can calculate the average within each zone using the following steps:

  • Convert your mesh vector to raster using Rasterize (vector to raster) tool
  • The Rasterize tool is located under Processing Toolbox -> GDAL/OGR -> Conversion -> Rasterize (vector to raster)
  • Make sure that horizontal and vertical cell sizes are similar to the mesh size of original size
  • Use Zonal Statistics tool to calculate the average elevation within each administrative boundary. The Zonal Statistics tool is located under Raster main menu -> Zonal Statistics -> Zonal Statistics
  • Select input raster (Elevation), Polygon layer containing zone (administrative boundary), and under Statistics to calculate, select Mean

Make sure that both elevation raster data and administrative boundary have the same projection (CRS).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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