Search code examples
pythongeopandas

How lo overlay shape files in geopandas


I have two shapefiles with geometry polygons. I want to overlay the maps so the boundaries of the second one stay as limits on the first

Here is a notebook with the code and the maps i want to merge: enter link description here


Solution

  • The way I got around this is setting one as a subplot and the other as a boundary with no fill color:

    fig, ax = pyplot.subplots(ncols=1)
    ax = df2.plot(edgecolor='yellow')
    
    df.geometry.boundary.plot(color=None,edgecolor='k',linewidth = 2,ax=ax)