class EsriShapefile::MainFileHeader

The main file header is 100 bytes long. The fields in the file header are listed below with their byte position, type, and byte order. Position is with respect to the start of the file.

Public Instance Methods

file_length_bytes() click to toggle source

The value for file length is the total length of the file in 16-bit words (including the fifty 16-bit words that make up the header). This means that we need to multiply the value by 2 in order to know the size of the file in bytes

# File lib/esri_shapefile/models/main_file_header.rb, line 37
def file_length_bytes
  file_length * 2
end
shape() click to toggle source
# File lib/esri_shapefile/models/main_file_header.rb, line 41
def shape
  Shapes.from_type(shape_type)
end