module OGR::LayerMixins::CapabilityMethods

Helper methods for checking what the Layer is capable of.

Public Instance Methods

can_alter_field_definition?() click to toggle source

@return [Boolean] true if the Layer supports altering the defintition

of an existing field on the current layer.
# File lib/ogr/extensions/layer/capability_methods.rb, line 77
def can_alter_field_definition?
  test_capability("AlterFieldDefn")
end
can_create_field?() click to toggle source

@return [Boolean] true if new Fields can be created on this Layer.

# File lib/ogr/extensions/layer/capability_methods.rb, line 53
def can_create_field?
  test_capability("CreateField")
end
can_create_geometry_field?() click to toggle source

@return [Boolean] true if the Layer supports creating new geometry

fields on the current layer.
# File lib/ogr/extensions/layer/capability_methods.rb, line 59
def can_create_geometry_field?
  test_capability("CreateGeomField")
end
can_delete_feature?() click to toggle source

@return [Boolean] true if the Layer supports deleting Features.

# File lib/ogr/extensions/layer/capability_methods.rb, line 82
def can_delete_feature?
  test_capability("DeleteFeature")
end
can_delete_field?() click to toggle source

@return [Boolean] true if the Layer supports deleting existing fields

on the current layer.
# File lib/ogr/extensions/layer/capability_methods.rb, line 65
def can_delete_field?
  test_capability("DeleteField")
end
can_fast_feature_count?() click to toggle source

@return [Boolean] true if this layer can return a feature count

efficiently (i.e. without counting all of the features).
# File lib/ogr/extensions/layer/capability_methods.rb, line 36
def can_fast_feature_count?
  test_capability("FastFeatureCount")
end
can_fast_get_extent?() click to toggle source

@return [Boolean] true if this Layer can return its extent

efficiently (i.e. without scanning all of the features.).
# File lib/ogr/extensions/layer/capability_methods.rb, line 42
def can_fast_get_extent?
  test_capability("FastGetExtent")
end
can_fast_set_next_by_index?() click to toggle source

@return [Boolean] true if this layer can perform the

#next_feature_index= call efficiently.
# File lib/ogr/extensions/layer/capability_methods.rb, line 48
def can_fast_set_next_by_index?
  test_capability("FastSetNextByIndex")
end
can_fast_spatial_filter?() click to toggle source

@return [Boolean] true if this layer implements spatial filtering

efficiently. This can be used as a clue by the application whether
it should build and maintain its own spatial index for features in
this layer.
# File lib/ogr/extensions/layer/capability_methods.rb, line 30
def can_fast_spatial_filter?
  test_capability("FastSpatialFilter")
end
can_random_read?() click to toggle source

@return [Boolean] true if feature() is implemented in an optimized

manner for this layer (as opposed to using #next_feature and
#reset_reading).
# File lib/ogr/extensions/layer/capability_methods.rb, line 12
def can_random_read?
  test_capability("RandomRead")
end
can_random_write?() click to toggle source

@return [Boolean] true if feature= is allowed on this layer.

# File lib/ogr/extensions/layer/capability_methods.rb, line 22
def can_random_write?
  test_capability("RandomWrite")
end
can_reorder_fields?() click to toggle source

@return [Boolean] true if the Layer supports reording fields on the

current layer.
# File lib/ogr/extensions/layer/capability_methods.rb, line 71
def can_reorder_fields?
  test_capability("ReorderFields")
end
can_sequential_write?() click to toggle source

@return [Boolean] true if create_feature is allowed on this layer.

# File lib/ogr/extensions/layer/capability_methods.rb, line 17
def can_sequential_write?
  test_capability("SequentialWrite")
end
strings_are_utf_8?() click to toggle source

@return [Boolean] true if :OFTString fields are guaranteed to be in

UTF-8.
# File lib/ogr/extensions/layer/capability_methods.rb, line 88
def strings_are_utf_8?
  test_capability("StringsAsUTF8")
end
supports_curve_geometries?() click to toggle source

@return [Boolean] true if this Layer supports reading or writing

curve geometries.
# File lib/ogr/extensions/layer/capability_methods.rb, line 101
def supports_curve_geometries?
  test_capability("CurveGeometries")
end
supports_transactions?() click to toggle source

@return [Boolean] true if this Layer supports transactions. If not,

#start_transaction, #commit_transaction, and #rollback_transaction
will not work in a meaningful manner.
# File lib/ogr/extensions/layer/capability_methods.rb, line 95
def supports_transactions?
  test_capability("Transactions")
end