Sha256: b85f61dd7bade8f7b1553468f9def9ca8e53b0da7813b603420253900ba6cbb3

Contents?: true

Size: 624 Bytes

Versions: 14

Compression:

Stored size: 624 Bytes

Contents

module SpatialAdapter
  class RawGeomInfo < Struct.new(:type,:srid,:dimension,:with_z,:with_m) #:nodoc:
    def convert!
      self.type = "geometry" if self.type.nil? #if geometry the geometrytype constraint is not present : need to set the type here then
    
      if dimension == 4
        self.with_m = true
        self.with_z = true
      elsif dimension == 3
        if with_m
          self.with_z = false
          self.with_m = true 
        else
          self.with_z = true
          self.with_m = false
        end
      else
        self.with_z = false
        self.with_m = false
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
beh_spatial_adapter-1.1.2 lib/spatial_adapter/common/raw_geom_info.rb
rs_spatial_adapter-1.2.0 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-1.3.1 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-1.3.0 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-1.2.0 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-1.1.2 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-1.1.1 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-1.1.0 lib/spatial_adapter/common/raw_geom_info.rb
achirkunov-spatial_adapter-1.0.0 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-1.0.0 lib/spatial_adapter/common/raw_geom_info.rb
spatial_adapter-0.3.1 lib/spatial_adapter/raw_geom_info.rb
spatial_adapter-0.3.0 lib/spatial_adapter/raw_geom_info.rb
spatial_adapter-0.2.1 lib/spatial_adapter/raw_geom_info.rb
spatial_adapter-0.2.0 lib/spatial_adapter/raw_geom_info.rb