Module: GDAL::Gridder::PointExtracting

Included in:
GDAL::Gridder
Defined in:
lib/gdal/extensions/gridder/point_extracting.rb

Overview

Methods used for extracting points from a OGR::Layer. Only used when points are not passed in on initialize.

Instance Method Summary collapse

Instance Method Details

#pointsArray<Array>

Gathers all points from the associated layer. If GridderOptions#input_clipping_geometry is set, it filters out any points that fall within that geometry. This is really just indented for internal use, but is being left public just in case it serves some benefit for debugging.

Returns:

  • (Array<Array>)


14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/gdal/extensions/gridder/point_extracting.rb', line 14

def points
  return @points if @points

  ensure_z_values

  @points =
    if @options.input_field_name
      points_with_field_attributes(@source_layer, @options.input_field_name, @options.input_clipping_geometry)
    else
      points_no_field_attributes(@source_layer, @options.input_clipping_geometry)
    end
end