GeoDataFrame

class GeoDataFrame<T : WithGeometry>(val df: DataFrame<T>, val crs: CoordinateReferenceSystem?)

A data structure representing a geographical DataFrame, combining spatial data with an optional Coordinate Reference System (CRS).

Integrates with Kandy for plotting:

Type Parameters

T

The type parameter extending WithGeometry, indicating the presence of a geometry column.

Constructors

Link copied to clipboard
constructor(df: DataFrame<T>, crs: CoordinateReferenceSystem?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val crs: CoordinateReferenceSystem?

The coordinate reference system associated with the data, if any.

Link copied to clipboard
val df: DataFrame<T>

The underlying DataFrame containing geometries.

Functions

Link copied to clipboard
fun applyCrs(targetCrs: CoordinateReferenceSystem): GeoDataFrame<T>

Transforms the geometries to a specified Coordinate Reference System (CRS).

Link copied to clipboard
fun GeoDataFrame<*>.bounds(): ReferencedEnvelope

Computes the bounding envelope for all geometries in a GeoDataFrame, considering the specified coordinate reference system (CRS).

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
inline fun modify(block: DataFrame<T>.(DataFrame<T>) -> DataFrame<T>): GeoDataFrame<T>

Creates a new GeoDataFrame by applying transformations to the underlying DataFrame.

Link copied to clipboard
fun GeoDataFrame<*>.toSimpleFeatureCollection(name: String? = null, singleGeometryType: Boolean = false): SimpleFeatureCollection

Converts the GeoDataFrame to a SimpleFeatureCollection.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Writes this GeoDataFrame into a GeoJSON file.

Link copied to clipboard
fun GeoDataFrame<*>.writeShapefile(directory: File)
fun GeoDataFrame<*>.writeShapefile(directory: Path)
fun GeoDataFrame<*>.writeShapefile(directoryPath: String)

Writes this GeoDataFrame into a Shapefile.