GeoDataFrame#

A GeoDataFrame 是一个表格数据结构,其中包含一个列,该列包含 GeoSeries 存储几何图形。

构造器#

GeoDataFrame \([data, geometry, crs] )

GeoDataFrame对象是具有带有几何体的列的Pandas.DataFrame。

序列化/IO/转换#

GeoDataFrame.from_file \(文件名, ** Kwargs)

替代构造函数以创建 GeoDataFrame 从一个文件中。

GeoDataFrame.from_features \(功能[, crs, ...] )

从可迭代的要素或要素集合创建GeoDataFrame的备用构造函数。

GeoDataFrame.from_postgis \(SQL,CON[, ...] )

替代构造函数以创建 GeoDataFrame 来自包含WKB表示形式的几何图形列的SQL查询。

GeoDataFrame.to_file \(文件名[, driver, ...] )

写下 GeoDataFrame 保存到文件中。

GeoDataFrame.to_json \([na, show_bbox, drop_id] )

对象的GeoJSON表示形式 GeoDataFrame 作为一根弦。

GeoDataFrame.to_parquet \(路径[, index, ...] )

将GeoDataFrame编写为Parquet格式。

GeoDataFrame.to_feather \(路径[, index, ...] )

将GeoDataFrame编写为Feather格式。

GeoDataFrame.to_postgis \(名称,控制 [, schema, ...] )

将GeoDataFrame上传到PostGIS数据库。

GeoDataFrame.to_wkb \([hex] )

将GeoDataFrame中的所有几何图形列编码为WKB。

GeoDataFrame.to_wkt \(** Kwargs)

将GeoDataFrame中的所有几何图形列编码为WKT。

投影处理#

GeoDataFrame.crs 

坐标参考系(CRS)表示为 pyproj.CRS 对象。

GeoDataFrame.set_crs \([crs, epsg, inplace, ...] )

设置的坐标系(CRS) GeoDataFrame

GeoDataFrame.to_crs \([crs, epsg, inplace] )

将几何图形变换到新的坐标参考系。

GeoDataFrame.estimate_utm_crs \([datum_name] )

根据数据集的边界返回估计的UTM CRS。

活动几何图形处理#

GeoDataFrame.rename_geometry \(列 [, inplace] )

将GeoDataFrame几何列重命名为指定的名称。

GeoDataFrame.set_geometry \(列 [, drop, ...] )

使用现有列或指定的输入设置GeoDataFrame几何图形。

聚集和爆炸#

GeoDataFrame.dissolve \([by, aggfunc, ...] )

融合内的几何图形 groupby 变成了单一的观察。

GeoDataFrame.explode \([column, ignore_index, ...] )

将多零件几何图形分解为多个单一几何图形。

空间连接#

GeoDataFrame.sjoin \(df,*args, * *kwargs)

两个GeoDataFrame的空间联接。

GeoDataFrame.sjoin_nearest \(右[, how, ...] )

基于两个GeoDataFrame几何图形之间的距离进行空间连接。

叠加操作#

GeoDataFrame.clip \(掩码[, keep_geom_type] )

将点、线或多边形几何体剪裁到遮罩范围。

GeoDataFrame.overlay \(右[, how, ...] )

在GeoDataFrame之间执行空间覆盖。

标绘#

GeoDataFrame.explore \(*args, * *kwargs)

基于Folium/leaflet.js的交互地图基于GeoPandas和Folium/leaflet.js的交互地图

GeoDataFrame.plot 

:py:class:`geopandas.plotting.GeoplotAccessor`的别名

空间索引#

GeoDataFrame.sindex 

生成空间索引

GeoDataFrame.has_sindex 

检查空间索引是否存在,而不生成它。

标引#

GeoDataFrame.cx 

基于坐标的索引器,通过与边界框的交点进行选择。

接口#

GeoDataFrame.__geo_interface__ 

返回一个 GeoDataFrame 作为一个PYTHON功能集合。

GeoDataFrame.iterfeatures \([na, show_bbox, ...] )

返回一个迭代器,该迭代器生成符合 __geo_interface__

所有的熊猫 DataFrame methods are also available, although they may not operate in a meaningful way on the geometry column. All methods listed in GeoSeries 直接处理GeoDataFrame的活动几何图形列。