class OGR::Writer
Attributes
ptr[RW]
type[RW]
Public Class Methods
new(driver_name)
click to toggle source
# File lib/ffi-ogr/writer.rb, line 7 def initialize(driver_name) OGRRegisterAll() @driver = OGRGetDriverByName(driver_name) raise RuntimeError.new "Invalid driver name" if @driver.null? @type = driver_name end
Public Instance Methods
set_output(path, options={})
click to toggle source
# File lib/ffi-ogr/writer.rb, line 14 def set_output(path, options={}) path = File.expand_path(path) ds = OGR_Dr_CreateDataSource(@driver, path, nil) @ptr = OGR::Tools.cast_data_source(ds) @ptr end