I'm looking for a method to align the borders of two overlapping and already existing polygon layers. I'm aware of the node tool and its tolerance snapping option, but the area I'm working with is too large to do it manually.

I have two polygon layers. Layer 1 contains about 11,000 municipality features. Layer 2 contains 14 climatic zones (colored in picture 1).

Two layers with precise municipality features and unprecise climate zone features

As seen in picture 2 the outer border of the two layers do not fit. First of all I would like to manipulate the outer border of the climate zone layer (colored) so that it aligns with the outer border of the municipality features. Further I do not want the climate zone features to split the municipality features. One municipality shall be covered by only one climate zone.

Detail: Outer borders are not aligned. Some municipalites are intersected by the climate zone layer

At the very end I plan to intersect the two layers so that I have a list: Municipality ID to climate zone ID.

So far I only found a tool for ArcGIS, called Align to Shape.

Is something like this available for QGIS too?

3 Answers 3


Offhand I don't know of a QGIS tool that does it, but I have a couple of ideas on how to tackle the problem.

One possible workflow, though not automatic, would be to dissolve all municipal to a temp polygon, then clip the climate data using that. This would eliminate the exterior overlaps and leave only the interior gaps, which would be fewer problems to address. You could then intersect the two and join the result back to municipal to transfer the climate attributes back to unmodified municipals, thus preserving the areas that get dropped in the intersect.

That doesn't address the interior climate borders though. A possible solution to that (which also disregards the above) would be to convert the municipals to centroids, intersect the centroids with climate, then join the result back to municipals to assign the climate attributes. The consideration here is how split municipals will be handled. First you'd want to make sure you constrained the centroids so they were point inside (not necessarily true centroids). Then you have to decide if you can live with or need to check for cases where the majority of the municipal falls in one climate but the 'centroid' falls in another. Assuming you want to use a majority rule assignment that is.

Yet another possibility might be a Spatial Join constrained to a one-to-one match.

  • Chris thanks for your answer! I choose to follow your approach with the centroids. Luckily only a few centroids weren't within their municipality polygon, so after identifying I could move them manually. Some municipalities are not assigned to the climate zone their major area is in. But this is an error I can live with, since the climate zones are rather rough.
    – damian
    Dec 5, 2014 at 13:43

I would recommend these steps:

  • Create polygon centroids for your municipality features.
  • Next use "join attributes by location" to give these new centroids all a new attribute that is the climate zone.
  • Then join this centroid layer to your original municipality polygons by a unique ID only including the new climate zone though.
  • (Optional): Create a new dissolved version of the municipalities polygon layer which dissolves using the new climate area variable as the 'dissolve by' variable. This may through up lots of slither polygons though, but the areas are large enough to clean relatively easily with cleaning tools.

I know I'm late to this answer, but since I came across the same problem, this is how I solved it.

Download and install the MMQGIS plugin, then in the menubar select MMQGIS>Combine>Spatial Join

In the popup window select the municipalities as the target layer and the climate layer as the join layer. Select the climateID as the join field then select 'Largest Proportion' as the field operation. That way, you have a rough spatial join.

Your Answer

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

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