Skip to content

Commit

Permalink
v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed May 23, 2019
1 parent 93cb78f commit b2f8338
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions lib/mapknitterExporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ def self.distort_warpables(scale, images, export, id)
def self.generate_composite_tiff(coords, origin, warpables, id, ordered)
directory = "public/warps/#{id}/"
composite_location = directory + id.to_s + '.tif'
geotiffs = ''
minlat = nil
minlon = nil
maxlat = nil
Expand All @@ -270,18 +269,14 @@ def self.generate_composite_tiff(coords, origin, warpables, id, ordered)
# sort by area; this would be overridden by a provided order
warpables = warpables.sort{ |a,b| b['poly_area'] <=> a['poly_area'] }
end
geotiffs = ""
warpables.each do |warpable|
wid = "w" + warpable['id'].to_s
geotiffs += ' '+directory+wid+'.tif'
if first
gdalwarp = "gdalwarp -s_srs EPSG:3857 -te #{minlon} #{minlat} #{maxlon} #{maxlat} #{directory}#{wid}.tif #{directory}#{id}.tif"
first = false
else
gdalwarp = "gdalwarp #{directory}#{wid}.tif #{directory}#{id}.tif"
end
puts gdalwarp
system(self.ulimit+gdalwarp)
end
gdalwarp = "gdalwarp -s_srs EPSG:3857 -te #{minlon} #{minlat} #{maxlon} #{maxlat} #{geotiffs} #{directory}#{id}.tif"
puts gdalwarp
system(self.ulimit+gdalwarp)
composite_location
end

Expand Down
Binary file added mapknitter-exporter-1.0.5.gem
Binary file not shown.
4 changes: 2 additions & 2 deletions mapknitter-exporter.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'mapknitter-exporter'
s.version = '1.0.4'
s.date = '2019-05-17'
s.version = '1.0.5'
s.date = '2019-05-22'
s.summary = "The GDAL/ImageMagick-based exporter system from MapKnitter"
s.description = "The GDAL/ImageMagick-based exporter system from MapKnitter"
s.authors = ["Jeffrey Warren"]
Expand Down

0 comments on commit b2f8338

Please sign in to comment.