コード例 #1
0
ファイル: geotiffer.py プロジェクト: johnzech/geotiffer
	def processWarp(self, path):
		# actual warp processing method, just sets up a Warp object and starts it with the given path
		warp = Warp(self.getFullPath(path), "%s.csv" %self.getCSVOutputPath(path), self.append_filename, self.layers, self.layers_include_exclude, self.dpi, self.fix_no_data)
		warp.executeGdalWarp()

		if self.edge_smoothing_factor > 0:
			self.processEdgeWarps(path)
コード例 #2
0
ファイル: geotiffer.py プロジェクト: johnzech/geotiffer
	def processEdgeWarps(self,path):
		# process warps for edge smoothing (series of small samples along the edges)
		# these warp processes simply process small geotiffs based on a series of csv files
		# csv filenames are specifically encoded by the neatline process 
		# expected csv filename format: <baseCSVFilePath><top|right|left|bottom>_<section_number>_<section_count>.csv
		# Note: 'z' is appended to the filenames of these tiffs to facilitate cleanup of edge smoothing tiffs (see cleanup() below)
		section_count = int(self.edge_smoothing_factor)
		for section in range(1,section_count):
			for file_prepend in ['top', 'right', 'left', 'bottom']:
				warp = Warp(self.getFullPath(path), "%s%s_%s_%s.csv" % (self.getCSVOutputPath(path),file_prepend,section,section_count), "%s_%s_%s_%s" % (self.append_filename, file_prepend,section,section_count), self.layers, self.layers_include_exclude, self.dpi, self.fix_no_data, 'z')
				warp.executeGdalWarp()