Class: GeoRuby::Shp4r::ShpRecord
- Inherits:
-
Object
- Object
- GeoRuby::Shp4r::ShpRecord
- Defined in:
- lib/geo_ruby/shp4r/shp_record.rb
Overview
A SHP record : contains both the geometry and the data fields (from the DBF)
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#geometry ⇒ Object
readonly
Returns the value of attribute geometry.
Instance Method Summary collapse
-
#has_null_shape? ⇒ Boolean
Tests if the geometry is a NULL SHAPE.
-
#initialize(geometry, data) ⇒ ShpRecord
constructor
A new instance of ShpRecord.
Constructor Details
#initialize(geometry, data) ⇒ ShpRecord
Returns a new instance of ShpRecord.
5 6 7 8 |
# File 'lib/geo_ruby/shp4r/shp_record.rb', line 5 def initialize(geometry, data) @geometry = geometry @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/geo_ruby/shp4r/shp_record.rb', line 3 def data @data end |
#geometry ⇒ Object (readonly)
Returns the value of attribute geometry.
3 4 5 |
# File 'lib/geo_ruby/shp4r/shp_record.rb', line 3 def geometry @geometry end |
Instance Method Details
#has_null_shape? ⇒ Boolean
Tests if the geometry is a NULL SHAPE
11 12 13 |
# File 'lib/geo_ruby/shp4r/shp_record.rb', line 11 def has_null_shape? @geometry.nil? end |