def write(geom, options = nil)
      unless options.nil?
        old_options = {
          trim: trim,
          old_3d: old_3d,
          rounding_precision: rounding_precision,
          output_dimensions: output_dimensions
        }

        set_options(options)
      end

      FFIGeos.GEOSWKTWriter_write_r(Geos.current_handle_pointer, ptr, geom.ptr)
    ensure
      set_options(old_options) unless options.nil?
    end
def write(geom, options = nil)
      unless options.nil?
        old_options = {
          trim: trim,
          old_3d: old_3d,
          rounding_precision: rounding_precision,
          output_dimensions: output_dimensions
        }

        set_options(options)
      end

      FFIGeos.GEOSWKTWriter_write_r(Geos.current_handle_pointer, ptr, geom.ptr)
    ensure
      set_options(old_options) unless options.nil?
    end
Options can be set temporarily for individual writes using an options
 Hash. Options include :trim, :old_3d, :rounding_precision and
 :output_dimensions