Sha256: 18c957384a72b1d6b0fa32374395ef662013b554342e641ac72279db16fcee52

Contents?: true

Size: 385 Bytes

Versions: 3

Compression:

Stored size: 385 Bytes

Contents

require 'json'

module OGR
  module GeometryFieldDefinitionExtensions
    # @return [Hash]
    def as_json(options = nil)
      {
        is_ignored: ignored?,
        name: name,
        spatial_reference: spatial_reference ? spatial_reference.as_json(options) : nil,
        type: type
      }
    end

    def to_json(options = nil)
      as_json(options).to_json
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ffi-gdal-1.0.0.beta6 lib/ogr/geometry_field_definition_extensions.rb
ffi-gdal-1.0.0.beta5 lib/ogr/geometry_field_definition_extensions.rb
ffi-gdal-1.0.0.beta4 lib/ogr/geometry_field_definition_extensions.rb