Created
May 8, 2019 05:13
-
-
Save shaystrong/42c18fde598ca296aff3cad33ed84087 to your computer and use it in GitHub Desktop.
building polygons to rectangles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def footprint2box(vector): | |
df = vector | |
df['geometry']=df.envelope #round to nearest (axis-aligned) rectangle | |
df['class']='building' #all buildings we will just call class=buildings | |
return df | |
df=footprint2box(buildings) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment