Class: GeoRuby::Shp4r::ShpRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/geo_ruby/shp4r/shp.rb

Overview

A SHP record : contains both the geometry and the data fields (from the DBF)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(geometry, data) ⇒ ShpRecord

Returns a new instance of ShpRecord.



328
329
330
331
# File 'lib/geo_ruby/shp4r/shp.rb', line 328

def initialize(geometry, data)
  @geometry = geometry
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



326
327
328
# File 'lib/geo_ruby/shp4r/shp.rb', line 326

def data
  @data
end

#geometryObject (readonly)

Returns the value of attribute geometry.



326
327
328
# File 'lib/geo_ruby/shp4r/shp.rb', line 326

def geometry
  @geometry
end

Instance Method Details

#has_null_shape?Boolean

Tests if the geometry is a NULL SHAPE

Returns:

  • (Boolean)


334
335
336
# File 'lib/geo_ruby/shp4r/shp.rb', line 334

def has_null_shape?
  @geometry.nil?
end