diff --git a/src/ogr/featurelayer.jl b/src/ogr/featurelayer.jl index cb94db29..bbb21268 100644 --- a/src/ogr/featurelayer.jl +++ b/src/ogr/featurelayer.jl @@ -61,6 +61,8 @@ function unsafe_createlayer(; geom, options, ), + ownedby = dataset, + spatialref = spatialref, ) end diff --git a/src/types.jl b/src/types.jl index 75697ca8..63401407 100644 --- a/src/types.jl +++ b/src/types.jl @@ -111,6 +111,16 @@ end mutable struct FeatureLayer <: AbstractFeatureLayer ptr::GDAL.OGRLayerH + ownedby::AbstractDataset + spatialref::AbstractSpatialRef +end + +function FeatureLayer( + ptr::GDAL.OGRLayerH = C_NULL; + ownedby::AbstractDataset = Dataset(), + spatialref::AbstractSpatialRef = SpatialRef(), +) + return FeatureLayer(ptr, ownedby, spatialref) end mutable struct IFeatureLayer <: AbstractFeatureLayer