Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoSentinel
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoSentinel
Commits
e487e206
Commit
e487e206
authored
Nov 19, 2021
by
Mario Chirinos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
1eccc82b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
35 deletions
+106
-35
cloudFreeWKT.py
geosentinel/cloudFreeWKT.py
+19
-0
setup.py
setup.py
+12
-35
downloadWKT.sh
tools/downloadWKT.sh
+75
-0
No files found.
geosentinel/cloudFreeWKT.py
0 → 100644
View file @
e487e206
#!/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
)
setup.py
View file @
e487e206
# 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"
])
tools/downloadWKT.sh
0 → 100755
View file @
e487e206
#!/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
}
"
\n
Merging 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"
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