descripcion reportes

parent a3a9c241
......@@ -338,23 +338,17 @@ def mergeimages(path,file):
from PIL import Image
layer1 = Image.open(path + file[:8] + "_SCL_60m_0.tif")
for i in range(10):
print (file[:8] + "_SCL_60m_" + str(i) + ".tif")
layer2 = Image.open(path + file[:8] + "_SCL_60m_" + str(i) + ".tif")
nueva = Image.alpha_composite(layer1, layer2)
layer1 = nueva
nueva.save(path + file[:8] + "_SCL_60m_10.tif")
return path+file[:8]+"_SCL_60m_10.tif"
# create the table for our document
def myTable(path1, path2, basefile):
#image1 = Image(path1, height=300, width=200, mask='auto')
image1 = Image(path1)
if image1.imageWidth < image1.imageHeight:
print ("mas alto que ancho")
image2 = Image(path1, height=300, width=200, mask='auto')
else:
image2 = Image(path1, height=150, width=400, mask='auto')
......@@ -471,7 +465,6 @@ def PDFGenerator(request, ruta, reporteDir, datasets,searchInfo):
story = []
#story.append(tileinfo("hola"))
# define the style for our paragraph text
styles = getSampleStyleSheet()
......@@ -495,6 +488,7 @@ def PDFGenerator(request, ruta, reporteDir, datasets,searchInfo):
story.append(im)
story.append(Spacer(1, 1.5 * inch))
# add the title
story.append(Paragraph("<strong>"+searchInfo['report_name']+"</strong>", styleN,))
story.append(Spacer(1, .50 * inch))
......@@ -511,12 +505,6 @@ def PDFGenerator(request, ruta, reporteDir, datasets,searchInfo):
story.append(Paragraph("<strong>Clouds: "+str(searchInfo['clouds'])+" %</strong>", style2,))
story.append(Spacer(1, .40 * inch))
# convert data to paragraph form and then add paragraphs
#story.append(Paragraph(dataToParagraph(subject1, results1), styleN))
#story.append(Spacer(1, .25 * inch))
#story.append(Paragraph(dataToParagraph(subject2, results2), styleN))
#story.append(Spacer(1, .5 * inch))
story.append(PageBreak())
path, dirs, files = next(os.walk(thumbs))
......@@ -536,12 +524,10 @@ def PDFGenerator(request, ruta, reporteDir, datasets,searchInfo):
labels.append(data['label'])
path1 = thumbs + file
# Header
# Header
# print (width)
#########################33
im = Image(USERS_PATH + 'header.png', width=300, height=70)
im.hAlign = 'CENTER'
......@@ -554,9 +540,8 @@ def PDFGenerator(request, ruta, reporteDir, datasets,searchInfo):
story.append(Spacer(1, .5 * inch))
# add barchart and legend
# drawing = myBarChart(values[:len(values) - 1], maxi, file)
drawing = myBarChart(values, maxi, file)
# drawing = myBarLegend(drawing, labels[:len(labels) - 1])
drawing = myBarLegend(drawing, labels)
drawing.hAlign = 'CENTER'
story.append(drawing)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment