Skip to content

API

GeoDataFrames.read Function
julia
read(fn::AbstractString; layer::Union{Integer,AbstractString}, kwargs...)

Read a file into a DataFrame. Any kwargs are passed to the driver, by default set to ArchGDALDriver.

source

julia
read(driver::AbstractDriver, fn::AbstractString; kwargs...)

Read a file into a DataFrame using the specified driver. Any kwargs are passed to the driver, by default set to ArchGDALDriver.

source

julia
read(driver::ArchGDALDriver, fn::AbstractString; layer::Union{Integer,AbstractString}, kwargs...)

Read a file into a DataFrame using the ArchGDAL driver. By default you only get the first layer, unless you specify either the index (0 based) or name (string) of the layer. Other supported kwargs are passed to the ArchGDAL read method.

source

GeoDataFrames.write Function
julia
write(fn::AbstractString, table; kwargs...)

Write the provided table to fn. A driver is selected based on the extension of fn.

source

julia
write(driver::AbstractDriver, fn::AbstractString, table; kwargs...)

Write the provided table to fn using the specified driver. Any kwargs are passed to the driver, by default set to ArchGDALDriver.

source

julia
write(driver::ArchGDALDriver, fn::AbstractString, table; layer_name="data", crs::Union{GFT.GeoFormat,Nothing}=getcrs(table), driver::Union{Nothing,AbstractString}=nothing, options::Dict{String,String}=Dict(), geom_columns::Tuple{Symbol}=getgeometrycolumns(table), kwargs...)

Write the provided table to fn using the ArchGDAL driver.

source

GeoDataFrames.reproject Function
julia
reproject(df::DataFrame, to_crs)

Reproject the geometries in a DataFrame df to a new Coordinate Reference System to_crs, from the current CRS. See also reproject(df, from_crs, to_crs) and the in place version reproject!(df, to_crs).

source

julia
reproject(df::DataFrame, from_crs, to_crs)

Reproject the geometries in a DataFrame df from the crs from_crs to a new crs to_crs. This overrides any current CRS of the Dataframe.

source

GeoDataFrames.reproject! Function
julia
reproject!(df::DataFrame, to_crs)

Reproject the geometries in a DataFrame df to a new Coordinate Reference System to_crs, from the current CRS, in place.

source

julia
reproject!(df::DataFrame, from_crs, to_crs)

Reproject the geometries in a DataFrame df from the crs from_crs to a new crs to_crs in place. This overrides any current CRS of the Dataframe.

source

Drivers

The following drivers are provided:

GeoDataFrames.GeoJSONDriver Type

GeoJSON driver

source

GeoDataFrames.ShapefileDriver Type

Shapefile driver

source

GeoDataFrames.GeoParquetDriver Type

GeoParquet driver

source

GeoDataFrames.FlatGeobufDriver Type

FlatGeobuf driver

source

GeoDataFrames.ArchGDALDriver Type

ArchGDAL driver (default)

source

GeoDataFrames.GeoArrowDriver Type

GeoArrow driver

source

These can be passed to the read and write functions as the first argument, but require the corresponding package to be loaded. You can find the corresponding package to load in the package extensions section.