Module: OGR::LayerMixins::OGRLayerMethodMethods
- Included in:
- OGR::Layer
- Defined in:
- lib/ogr/layer_mixins/ogr_layer_method_methods.rb
Overview
OGR::Layer methods: Ruby methods that operate on a OGR::Layer using a “method layer”. The method layer is combined with the current layer in some fashion, which results in a new OGR::Layer.
Instance Method Summary collapse
-
#clip(method_layer, output_layer, **options, &progress) ⇒ Object
Clip off areas of this layer that are not covered by the method layer.
-
#erase(method_layer, output_layer, **options, &progress) ⇒ Object
Remove areas in this layer that are covered by the method layer.
-
#identity(method_layer, output_layer, **options, &progress) ⇒ Object
The result layer contains features whose geometries represent areas that are in the input layer.
-
#intersection(method_layer, output_layer, **options, &progress) ⇒ Object
Intersection of this layer and
method_layer
. -
#symmetrical_difference(method_layer, output_layer, **options, &progress) ⇒ Object
The result layer contains features whose geometries represent areas that are either in this layer or the method layer, but not in both.
-
#union(method_layer, output_layer, **options, &progress) ⇒ Object
The result layer contains features whose geometries represent areas that are either in this layer or the method layer.
-
#update(method_layer, output_layer, **options, &progress) ⇒ Object
Update this layer with features from the update layer.
Instance Method Details
#clip(method_layer, output_layer, **options, &progress) ⇒ Object
Clip off areas of this layer that are not covered by the method layer. The result layer contains features whose geometries represent areas that are in the input layer and in the method layer. The features in the result layer have the (possibly clipped) areas of features in the input layer and the attributes from the same features.
26 27 28 |
# File 'lib/ogr/layer_mixins/ogr_layer_method_methods.rb', line 26 def clip(method_layer, output_layer, **, &progress) run_layer_method(:OGR_L_Clip, method_layer, output_layer, **, &progress) end |
#erase(method_layer, output_layer, **options, &progress) ⇒ Object
Remove areas in this layer that are covered by the method layer.
The result layer contains features whose geometries represent areas that are in this layer but not in the method layer. The features in the result layer have attributes from this layer.
47 48 49 |
# File 'lib/ogr/layer_mixins/ogr_layer_method_methods.rb', line 47 def erase(method_layer, output_layer, **, &progress) run_layer_method(:OGR_L_Erase, method_layer, output_layer, **, &progress) end |
#identity(method_layer, output_layer, **options, &progress) ⇒ Object
The result layer contains features whose geometries represent areas that are in the input layer. The features in the result layer have attributes from both input and method layers.
66 67 68 |
# File 'lib/ogr/layer_mixins/ogr_layer_method_methods.rb', line 66 def identity(method_layer, output_layer, **, &progress) run_layer_method(:OGR_L_Identity, method_layer, output_layer, **, &progress) end |
#intersection(method_layer, output_layer, **options, &progress) ⇒ Object
Intersection of this layer and method_layer
.
83 84 85 |
# File 'lib/ogr/layer_mixins/ogr_layer_method_methods.rb', line 83 def intersection(method_layer, output_layer, **, &progress) run_layer_method(:OGR_L_Intersection, method_layer, output_layer, **, &progress) end |
#symmetrical_difference(method_layer, output_layer, **options, &progress) ⇒ Object
The result layer contains features whose geometries represent areas that are either in this layer or the method layer, but not in both. The features in the result layer have attributes from both this layer and the method layer. For features which represent areas that are only in this layer or the method layer, the respective attributes have undefined values.
105 106 107 |
# File 'lib/ogr/layer_mixins/ogr_layer_method_methods.rb', line 105 def symmetrical_difference(method_layer, output_layer, **, &progress) run_layer_method(:OGR_L_SymDifference, method_layer, output_layer, **, &progress) end |
#union(method_layer, output_layer, **options, &progress) ⇒ Object
The result layer contains features whose geometries represent areas that are either in this layer or the method layer. The features in the result layer have attributes from both this layer and the method layer. For features which represent areas that are only in this or in the method layer, the respective attributes have undefined values.
126 127 128 |
# File 'lib/ogr/layer_mixins/ogr_layer_method_methods.rb', line 126 def union(method_layer, output_layer, **, &progress) run_layer_method(:OGR_L_Union, method_layer, output_layer, **, &progress) end |
#update(method_layer, output_layer, **options, &progress) ⇒ Object
Update this layer with features from the update layer. The result layer contains features whose geometries represent areas that are either in this layer or the method layer. The features in the result layer have areas of the features of the method layer or those areas of the features of this layer that are not covered by the method layer. The features of the result layer get their attributes from this layer.
148 149 150 |
# File 'lib/ogr/layer_mixins/ogr_layer_method_methods.rb', line 148 def update(method_layer, output_layer, **, &progress) run_layer_method(:OGR_L_Update, method_layer, output_layer, **, &progress) end |