Sha256: a337409959046444c68d36c90e1d7d4ae43c29ecf01304b7b43c8cfb14bd678d

Contents?: true

Size: 664 Bytes

Versions: 5

Compression:

Stored size: 664 Bytes

Contents

module GeoConcerns
  module Processors
    module Ogr
      extend ActiveSupport::Concern

      included do
        # Executes a ogr2ogr command. Used to reproject a
        # vector dataset and save the output as a shapefile
        # @param in_path [String] file input path
        # #param options [Hash] creation options
        # @param out_path [String] processor output file path
        def self.reproject(in_path, out_path, options)
          execute "env SHAPE_ENCODING= ogr2ogr -q -nln #{options[:basename]} -f 'ESRI Shapefile'"\
                    " -t_srs #{options[:output_srid]} '#{out_path}' '#{in_path}'"
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
geo_concerns-0.0.6 app/processors/geo_concerns/processors/ogr.rb
geo_concerns-0.0.5 app/processors/geo_concerns/processors/ogr.rb
geo_concerns-0.0.4 app/processors/geo_concerns/processors/ogr.rb
geo_concerns-0.0.3 app/processors/geo_concerns/processors/ogr.rb
geo_concerns-0.0.2 app/processors/geo_concerns/processors/ogr.rb