Skip to content

Commit

Permalink
fixes for composite
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed Apr 14, 2019
1 parent 19c5add commit 603f9e6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/mapknitterExporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,15 @@ def self.distort_warpables(scale, images, export, id)
end

# generate a tiff from all warpable images in this set
def self.generate_composite_tiff(coords, origin, placed_warpables, id, ordered)
def self.generate_composite_tiff(coords, origin, warpables, id, ordered)
directory = "public/warps/#{id}/"
composite_location = directory + id.to_s + '-geo.tif'
geotiffs = ''
minlat = nil
minlon = nil
maxlat = nil
maxlon = nil
placed_warpables.each do |warpable|
warpables.each do |warpable|
warpable['nodes'].each do |n|
minlat = n['lat'] if minlat == nil || n['lat'] < minlat
minlon = n['lon'] if minlon == nil || n['lon'] < minlon
Expand All @@ -265,7 +265,7 @@ def self.generate_composite_tiff(coords, origin, placed_warpables, id, ordered)
first = true
if ordered != true && placed_warpables.first.keys.include?('poly_area')
# sort by area; this would be overridden by a provided order
warpables = placed_warpables.sort{ |a,b| b['poly_area'] <=> a['poly_area'] }
warpables = warpables.sort{ |a,b| b['poly_area'] <=> a['poly_area'] }
end
warpables.each do |warpable|
wid = warpable['id'].to_s
Expand Down
Binary file added mapknitter-exporter-0.0.3.gem
Binary file not shown.
Binary file added mapknitter-exporter-0.0.4.gem
Binary file not shown.
2 changes: 1 addition & 1 deletion mapknitter-exporter.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'mapknitter-exporter'
s.version = '0.0.2'
s.version = '0.0.3'
s.date = '2019-04-14'
s.summary = "The GDAL/ImageMagick-based exporter system from MapKnitter"
s.description = "The GDAL/ImageMagick-based exporter system from MapKnitter"
Expand Down

0 comments on commit 603f9e6

Please sign in to comment.