Skip to content

Commit

Permalink
Ensure stats file is created
Browse files Browse the repository at this point in the history
Since load_raster expects to be able to rsync the statistics file that
is generated during the normalization step, we should have the
normalizer raise an error if it didn't get generated.

Refs #854
  • Loading branch information
edsu committed Mar 13, 2024
1 parent 9bd680c commit 630ae5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/gis_robot_suite/raster_normalizer.rb
Expand Up @@ -79,6 +79,7 @@ def convert_8bit_to_rgb

def compute_statistics
Kernel.system("#{Settings.gdal_path}gdalinfo -mm -stats -norat -noct #{output_filepath}", exception: true)
raise "load-raster: #{bare_druid} gdalinfo did not create stats file" unless File.size?("#{output_filepath}.aux.xml")
end

def tmpdir
Expand Down

0 comments on commit 630ae5d

Please sign in to comment.