Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
963dbf56
Commit
963dbf56
authored
Apr 11, 2019
by
Ulises Morales Ramírez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descripcion reportes
parent
a3a9c241
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
19 deletions
+4
-19
views.py
reports/views.py
+4
-19
No files found.
reports/views.py
View file @
963dbf56
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment