Commit 044c12c2 authored by Irving David's avatar Irving David

añadido archivo de configuración para leer el path de GeoSentinel

parent 18b0eb3d
{
"PATHS": {
"PATH_GEOSENTINEL": "/home/david/centroGEO/repsat/GeoSentinel",
"PATH_NAS": "/home/david/NAS/"
},
"API_SENTINEL": {
"SENTINEL_USER" : "emmhp",
"SENTINEL_PASS" : "geoemm29"
}
}
...@@ -5,10 +5,27 @@ import osgeo.osr as osr ...@@ -5,10 +5,27 @@ import osgeo.osr as osr
import numpy as np import numpy as np
import gdal import gdal
import sys import sys
import os
import json import json
from collections import Counter from collections import Counter
sys.path.append('/home/mario/git/GeoSentinel')
########### lee archivo de configuración ################
dirname = os.path.dirname(__file__)
configfile = os.path.join(dirname, '../config/config.json')
with open(configfile, 'r') as f:
config = json.load(f)
#print(config['PATHS']['PATH_GEOSENTINEL'])
SENTINEL_PATH = config['PATHS']['PATH_GEOSENTINEL']
###########################################################
sys.path.append(SENTINEL_PATH)
from geosentinel import rasterWkt from geosentinel import rasterWkt
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
def L2ASCLtoDict(filename, wkt): def L2ASCLtoDict(filename, wkt):
''' '''
......
...@@ -4,13 +4,24 @@ ...@@ -4,13 +4,24 @@
import sys, os import sys, os
import json import json
sys.path.append('/home/david/centroGEO/repsat/GeoSentinel/') ########### lee archivo de configuración ################
dirname = os.path.dirname(__file__)
configfile = os.path.join(dirname, '../config/config.json')
with open(configfile, 'r') as f:
config = json.load(f)
#print(config['PATHS']['PATH_GEOSENTINEL'])
SENTINEL_PATH = config['PATHS']['PATH_GEOSENTINEL']
###########################################################
sys.path.append(SENTINEL_PATH)
from geosentinel import APISentinel from geosentinel import APISentinel
from geosentinel import polygonToBox from geosentinel import polygonToBox
from datetime import date from datetime import date
#def findSentinelProducts(wkt, startDate, endDate, platform, cloud): #def findSentinelProducts(wkt, startDate, endDate, platform, cloud):
# sentinel = APISentinel.APISentinel('asalazarg', 'geo135asg') # sentinel = APISentinel.APISentinel('asalazarg', 'geo135asg')
......
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