axis ( 'equal' ) You can dissolve the boundaries between polygons based on an attribute label, such as region, as shown in this example. plot ( column = 'region', ax = ax ) # Set plot axis to equal ratioĪx. subplots ( figsize = ( 10, 6 )) # plot the data It’s always good to check your geometry before you begin to better know what you are working with.įig, ax = plt. Sometimes multi-polygons can cause problems when processing. geom_type you can see that you have a mix of single and multi polygons in your data. When you dissolve, you will create a new set polygons - one for each region in the United States. Source: ESRI.īelow you will dissolve the US states polygons by the region that each state is in. In the case above US states are dissolved to regions in the United States. When you dissolve polygons you remove interior boundaries of a set of polygons with the same attribute value and create one new "merged" (or combined) polygon for each attribute value. read_file ( "data/spatial-vector-lidar/usa/usa-states-census-2014.shp" ) Dissolve Polygons Based On an Attribute with Geopandasĭissolving polygons entails combining polygons based upon a unique attribute value and removing the interior geometry.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |