Commit 5e01a1cb authored by Irving Sánchez's avatar Irving Sánchez

Corregida la vista de tiles en el mapa. se muestran los tiles al hacer clic en...

Corregida la vista de tiles en el mapa. se muestran los tiles al hacer clic en un punto de la grafica
parent 75442042
......@@ -87,7 +87,7 @@ body
.draggable:hover {
opacity: 1;
}
/*
.title{
position: absolute;
top: 2%;
......@@ -114,3 +114,4 @@ body
#reportPage{
height: 940px !important;
}
*/
......@@ -160,13 +160,13 @@
<i class="fa fa-eye showChart"></i>
<i class="fa fa-eye-slash hideChart" style="display:none"></i>
<span class="showChart">Show Chart</span>
<span class="hideChart" style="display:none">Hidden Chart</span>
<span class="hideChart" style="display:none">Hide Chart</span>
<span class="pull-right-container">
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
<li>
<!-- <li>
<a class="treeview " href="#" onclick="showComparisons()">
<i class="fa fa-eye showImage"></i>
<i class="fa fa-eye-slash hideImage" style="display:none"></i>
......@@ -176,6 +176,6 @@
<span class="label label-primary pull-right"></span>
</span>
</a>
</li>
</li> -->
</ul>
</div>
......@@ -115,14 +115,11 @@
{% block content %}
<!-- Content Wrapper. Contains page content -->
<!-- Main content -->
<div id="reportPage" class="wrapper">
<div id="minimap"></div>
<div id="reportPage" class="wrapper" style="background-color: #ecf0f5">
<div class="text-center"><h1>{{ report_name }}</h1></div>
<section class="content">
<div class="row col-lg-11 title">
<div class="text-center">
<h1>{{ report_name }}</h1>
</div>
<div class="col-md-12 info" style="margin-bottom: 15px;">
<div class="row">
<div class="col-md-12" style="margin-bottom: 15px;">
<div class="box box-success">
<div class="box-body with-border">
<div class="row">
......@@ -175,7 +172,43 @@
</div>
<!-- /.col (LEFT) -->
<div class="col-md-4 draggable" id="draggableImage">
<div class="col-md-12" style="height: 800px">
<div class="nav-tabs-custom" id="tabs">
<!-- <ul class="nav nav-tabs">
<li ><a href="#images" data-toggle="tab">Images</a></li>
<li><a href="#compared" data-toggle="tab">Comparison</a></li>
<li><a href="#classification" data-toggle="tab">SCL</a></li>
<li class="active"><a href="#map" data-toggle="tab">Map</a></li>
</ul> -->
<div class="tab-content" style="padding: 0px">
<div class="tab-pane" id="images">
<div class="box box-danger">
<div class="box-header with-border">
<div class="pull-left">
<button type="button" id="play" class="btn btn-block btn-primary btn-xs" style="" onclick="play()">
<i class="fa fa-play"></i> Play
</button>
<button type="button" id="stop" class="btn btn-block btn-primary btn-xs" style="display: none; margin: 0px;"
onclick="stop()">
<i class="fa fa-stop"></i> Stop
</button>
</div>
<h3 class="box-title" id="titleMap" style="margin-left: -40px;">{{ defaultDataSet }}</h3>
</div>
<div class="box-body">
<div class="row img-comp-container">
<div class="col-lg-10 col-md-9 col-xs-10 col-lg-offset-1 col-md-offset-1 col-xs-offset-2"
style="padding: 0px 0px 0px 42px;">
<img onclick="open_big_image(this.src)" width="375" id="satImage" src="../../static/reports/tmpImages/repsat_test_dev/{{ IMAGE_PATH }}{{ dafaultLabel }}_TCI_60m.jpg"
style="margin-left: auto; margin-right: auto; display: block;">
</div>
</div>
</div>
<!-- /.box-body -->
</div>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="compared">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title" id="titleImageFirst">{{ defaultDataSet }}</h3>
......@@ -225,6 +258,90 @@
<!-- /.box-body -->
</div>
</div>
<!-- /.tab-pane -->
<div class="tab-pane" id="classification">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title" >Scene Classification Map - </h3>
<h3 class="box-title" id="titleSCL">{{ defaultDataSet }}</h3>
<!-- <div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i
class="fa fa-minus"></i>
</button>
</div> -->
</div>
<div class="box-body">
<div class="row">
<div class="col-lg-10 col-md-9 col-xs-10 col-lg-offset-1" id="showImageSCL" style="position: relative; height: 550px; padding: 0px 0px 0px 42px;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_saturated"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_saturated.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_shadows"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_shadows.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_shadows"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_cloud_shadows.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_vegetation"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_vegetation.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_not-vegetated"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_not-vegetated.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_water"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_water.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_unclassified"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_unclassified.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_medium_probability"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_cloud_medium_probability.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_cloud_high_probability"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_cloud_high_probability.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_thin_cirrus"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_thin_cirrus.png"
style="position: absolute; top: 0; z-index:1;">
<img onclick="window.open(this.src)" class="img-responsive" id="scl_snow"
width="375"
height="400px" src="../../static/reports/tmpImages/repsat_test_dev/{{ SCL_PATH }}{{ dafaultLabel }}_SCL_60m_snow.png"
style="position: absolute; top: 0; z-index:1;">
</div>
</div>
</div>
<!-- /.box-body -->
</div>
</div>
<!-- /.tab-pane -->
<div class="tab-pane active" id="map">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Map</h3>
</div>
<div class="box-body" style="max-height: 700px;">
<div id="minimap" style="height: 700px"></div>
</div>
<!-- /.box-body -->
</div>
</div>
<!-- /.tab-pane -->
</div>
<!-- /.tab-content -->
</div>
</div>
</div>
<!-- /.row -->
......
......@@ -264,11 +264,13 @@ def wsProcessProgress(request):
# tiles
def tiles(request, purchase_id, report, date, z, x, y):
print("tiles!!!")
absolute_path = USERS_PATH + request.user.email + '/' + purchase_id + '/out'
tile_folder = '/' + report + '/tiles/' + date + '_TCI_60m'
tile_folder = '/' + report + '/TCI/tiles/' + date + '_TCI_60m'
image = '/' + z + '/' + x + '/' + y + '.png'
image_path = absolute_path + tile_folder + image
print(image_path)
if not os.path.exists(image_path):
# raise Http404
......@@ -296,24 +298,29 @@ def mergedTiles(request, purchase_id, date, z, x, y):
# read a xml file with tiles info to display and return that info
@csrf_exempt
def tileinfo(request):
print("tileinfo!!!")
if request.is_ajax():
req = dict(request.POST)
resource_path = USERS_PATH + request.user.email + '/' + req['purchase_id'][0] + '/out'
print(req)
print(req['report'][0])
if req['report'][0]:
resource_path += '/' + req['report'][0] + '/tiles/'
if req['report'][0]!="mask":
resource_path += '/' + req['report'][0] + '/TCI/tiles/'
else:
resource_path += '/mask/TCI/tiles/'
resource_path += req['date'][0] + '_TCI_60m/tilemapresource.xml'
print(resource_path)
if not os.path.exists(resource_path):
raise Http404
tree = ET.parse(resource_path)
print(tree)
bounding_box = tree.find('BoundingBox')
sets = [set.get('order') for set in tree.findall('TileSets/TileSet')]
origin = tree.find('Origin')
......
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