使用geopandas中的数据创建地物[Python]

2024-10-04 11:27:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我的目标是在一个图形中创建4个子图。我从geojson文件获得的geotata的奇异图。代码是:

import numpy as np
import pandas as pd
import geojson
import geopandas as gpd
import matplotlib.pyplot as plt
from shapely.geometry import Polygon
from geojson import Point

ags = gpd.read_file('150824-altglascontainer-mannheim.geojson')
hts = gpd.read_file('standorte_hts_gesamt.geojson')
wlan = gpd.read_file('standorte-wlan-mit-geocode.geojson')
akc = gpd.read_file('150824-altkleidercontainer-mannheim.geojson')

fig = plt.figure()
ax1 = fig.add_subplot(221)   #top left
ax2 = fig.add_subplot(222)   #top right
ax3 = fig.add_subplot(223)   #bottom left
ax4 = fig.add_subplot(224)   #bottom right 

这样,什么都不会发生(这对我来说是有意义的)。不幸的是,我经常收到错误消息“unhable type:”numpy.ndarray公司'". 你知道吗

你有办法帮我吗?谢谢。你知道吗


Tags: fromimportnumpyaddreadasgeojsonfig