Sha256: 6929fd66b0bf70808a7319a6e236cdc853460977a07a77e152cd11e1f1095753

Contents?: true

Size: 669 Bytes

Versions: 6

Compression:

Stored size: 669 Bytes

Contents

module GeoWorks
  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[:id]} -f 'ESRI Shapefile'"\
                    " -t_srs #{options[:output_srid]} -preserve_fid '#{out_path}' '#{in_path}'"
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 app/processors/geo_works/processors/ogr.rb
geo_works-0.1.4 app/processors/geo_works/processors/ogr.rb
geo_works-0.1.3 app/processors/geo_works/processors/ogr.rb
geo_works-0.1.2 app/processors/geo_works/processors/ogr.rb
geo_works-0.1.1 app/processors/geo_works/processors/ogr.rb
geo_works-0.1.0 app/processors/geo_works/processors/ogr.rb