Commit e487e206 authored by Mario Chirinos's avatar Mario Chirinos

update

parent 1eccc82b
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
#from myModule import myModule
#===============================================================================
def cloudFreeWKT(text):
print()
#===============================================================================
def main(argv):
if len(argv) != 2:
print ("Usage text")
else:
cloudFreeWKT(argv[1])
if __name__ == "__main__":
main(sys.argv)
# Copyright (C) 2018 Adan Salazar <asalazargaribay@gmail.com>
#
#
# This file is part of GeoSentinel
#
#
# GeoSentinel is free software you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GeoSentinel is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with StereoVision. If not, see <http://www.gnu.org/licenses/>.
from setuptools import setup
setup(name="geosentinel",
version="1.0",
description=("Library and utilities for Sentinel products"),
author="Adan Salazar",
author_email="asalazargaribay@gmail.com",
author="Mario Chirinos Colunga",
author_email="mchirinos@centrogeo.edu.mx",
packages=["geosentinel"],
url="none",
download_url="none",
license="GNU GPL",
#requires=["numpy"],
provides=["geosentinel"],
classifiers=["Development Status :: 5 - Production/Stable",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: Freely Distributable",
"License :: OSI Approved :: GNU General Public License v3 "
"or later (GPLv3+)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Topic :: Multimedia :: Graphics :: Capture"])
classifiers=[
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Intended Audience :: Science/Research",
"License :: Freely Distributable",
"License :: OSI Approved :: GNU General Public License v3 "
"or later (GPLv3+)",
"Natural Language :: English"
])
#!/bin/sh
CFG=$1
#BYTILE=${2:-0}
CWD=$PWD"/"
RED='\033[0;31m'
NC='\033[0m' # No Color
echo "${RED}Downloding WKT area from Sentinel-Hub${NC}"
echo $CFG
wkt=$(jq -r .wkt $CFG)
SORT=$(jq -r .productsort $CFG)
echo "wkt: "
echo $wkt
#0.- Create Shape File From WKT
echo "${RED}Creating Shape file...${NC}"
if [ -d "myshape" ]; then
rm -r myshape
fi
wktToShape.py $CFG "myshape"
#1.- Link L2A products
echo ${RED}"Linking Products..."${NC}
if [ ! -d "L2A" ]; then
mkdir L2A
fi
cd L2A
rm *
cd ..
yes yes | findProducts.py $CFG
#2.- Extract Images
echo "sort: " $SORT
echo ${RED}"Extracting JP2 Images..."${NC}
if [ ! -d "jp2" ]; then
mkdir jp2
fi
if [ "$SORT" != "date" ]; then
echo "BY TILE" #tile/date
L2AProductListExtractData.sh $CWD"L2A/" $CWD"jp2/" 4 1
else
echo "BY DATE"
L2AProductListExtractData.sh $CWD"L2A/" $CWD"jp2/" 4 0
fi
echo "sort: " $SORT
cd $CWD
#3.- Merge Images
echo ${RED}"\nMerging Images..."${NC}
if [ ! -d "wkt" ]; then
mkdir "wkt"
fi
if [ "$SORT" != "date" ]; then
echo "BY TILE"
# cd "jp2/"
# ls -d */ | parallel -q --jobs 1 mergeImagesByDirectory.sh $USERDIR"jp2/"{} "$wtk" 4
for i in $(ls -d */) ; do
if [ ! -d "../out/"$i ]; then
mkdir "../out/"$i
fi
mergeImagesByDirectory.sh $CWD"jp2/"$i ../../../out/$i "$wkt"
done
else
echo "BY DATE"
# cd "jp2/"
mergeImagesByDirectory.sh $CWD"jp2/" $CWD"wkt/" "$wkt" 1
fi
echo "END"
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