In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "Python how to calculate the volume ratio and building density", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "Python how to calculate the volume ratio and building density" bar!
First, the area is calculated in ArcGIS, the dbf table is exported, and the data are processed and visualized in Python.
Data processing read data from dbfread import DBF import pandas as pd # # read dbf table table = DBF ("summary table .dbf", encoding= "utf8") data = pd.DataFrame (table) data.head () data cleaning data.rename (columns= {'parcel surface': 'parcel area', 'layers':' floor', 'gross building area': 'gross building area', 'base surface': 'base area'} Inplace = True) data = data.drop (labels= ["OBJECTID", "Shape_Leng", "Shape_Area", "floor"], axis=1) data = data [["parcel name", "base area", "gross building area", "parcel area"]] data.head () data perspective pivot1 = pd.pivot_table (data,index= ["parcel name"], values= ["base area", "gross building area",] Aggfunc=sum) pivot2 = pd.pivot_table (data,index= ["parcel name"], values= ["parcel area",], aggfunc=max) pivot = pd.merge (pivot1, pivot2, on= "parcel name") pivot calculated volume ratio and building density pivot ["building density"] = pivot ["base area"] / pivot ["parcel area"] pivot ["volume ratio"] = pivot ["total building area"] / pivot ["parcel area"] pivot result
Data visualization data reading import geopandas as gpdimport matplotlib.pyplot as pltregibns = gpd.GeoDataFrame.from_file ('MyProject.gdb',layer=' parcel') regibns.plot () data connection reg = pd.merge (regibns, pivot, left_on=' parcel name', right_on=' parcel name') reg graded color map reg.plot (figsize= (12,12), column=' plot ratio', scheme='quantiles', legend=True, cmap='Reds', edgecolor='k',) Land Development intensity Map
Thank you for reading, the above is the content of "how Python calculates volume ratio and building density". After the study of this article, I believe you have a deeper understanding of how Python calculates volume ratio and building density, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.