Sha256: 00c51f61fde891d998da1a81c2ebe1a58eb3b31c78fbf6cdbc896dfecc4dafe4

Contents?: true

Size: 873 Bytes

Versions: 7

Compression:

Stored size: 873 Bytes

Contents

# Uses the dbf lib, Copyright 2006 Keith Morrison (http://infused.org)
# Modified to work as external gem now
require 'rubygems'
begin
  require 'dbf'
rescue LoadError
  puts "You've loaded GeoRuby SHP Support."
  puts "Please install the gem 'dbf' to use it. `gem install dbf`"
end

module GeoRuby
  module Shp4r
    Dbf = DBF

    module Dbf
      class Record
        def [](v)
          attributes[v]
        end
      end

      class Field < Column::Base
        def initialize(name, type, length, decimal = 0, version=1, encoding=nil)
          super(name, type, length, decimal, version, encoding)
        end
      end

      class Reader < Table
        alias_method :fields, :columns
        def header_length
          @columns_count
        end

        def self.open(f)
          new(f)
        end

        def close(); nil;  end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
georuby-2.3.0 lib/geo_ruby/shp4r/dbf.rb
georuby-2.2.1 lib/geo_ruby/shp4r/dbf.rb
georuby-2.2.0 lib/geo_ruby/shp4r/dbf.rb
georuby-2.0.0 lib/geo_ruby/shp4r/dbf.rb
georuby-1.9.9 lib/geo_ruby/shp4r/dbf.rb
georuby-1.9.8 lib/geo_ruby/shp4r/dbf.rb
georuby-1.9.7 lib/geo_ruby/shp4r/dbf.rb