当我尝试绘制 Postgis Linestring 时,感谢gv.Path()
or hvplot(geo=True)
,我有这个错误:Supplied data does not contain specified dimensions, the following dimensions were not found: ['Longitude', 'Latitude']
。
sqla="Select Geography(ST_transform(traja,4326)) as traja, namea,nameb,mmsia,mmsib,p_dist,cpa_id from filtered where nm_a is not null and geometrytype(traja)='LINESTRING' limit 10"
gdf=gpd.read_postgis(sqla,con,geom_col='traja')
gdf.head()
type(gdf['traja'][0])
----------------
shapely.geometry.linestring.LineString
当我尝试可视化时:
gdf.hvplot(geo=True)
----------------
DataError: Supplied data does not contain specified dimensions, the following dimensions were not found: ['Longitude', 'Latitude']
PandasInterface expects tabular data, for more information on supported datatypes see http://holoviews.org/user_guide/Tabular_Datasets.html
当我这样做时hvplot(geo=False)
,它会起作用,但我想拥有一张底图并从 Geoview 的所有选项中受益。有人会有想法吗?