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
0b8048a9
Commit
0b8048a9
authored
May 14, 2018
by
Alfonso Ramire Pedraza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
17335915
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
25 deletions
+21
-25
APISentinel.py
geosentinel/APISentinel.py
+1
-1
Index.py
geosentinel/Index.py
+4
-4
Merge.py
geosentinel/Merge.py
+0
-2
Resampling.py
geosentinel/Resampling.py
+4
-6
SubSet.py
geosentinel/SubSet.py
+7
-7
readProduct.py
geosentinel/readProduct.py
+5
-5
No files found.
geosentinel/APISentinel.py
View file @
0b8048a9
...
@@ -19,7 +19,7 @@ class APISentinel(object):
...
@@ -19,7 +19,7 @@ class APISentinel(object):
>>> sentinel = APISentinel('asalazarg', 'geo135asg')
>>> sentinel = APISentinel('asalazarg', 'geo135asg')
>>> dir="make"
>>> dir="make"
>>> if not os.path.exists(dir):
>>> if not os.path.exists(dir):
>>>
os.mkdir(dir)
...
os.mkdir(dir)
>>> products = sentinel.getProducts("POLYGON((-89.99450683593753 21.279137394108716,-89.13757324218751 21.2996106049456,-89.30236816406251 20.68418377935238,-90.0494384765625 20.715015145512098,-89.99450683593753 21.279137394108716))", ('20151219', date(2015,12,29)), {"platformname":"Sentinel-2"})
>>> products = sentinel.getProducts("POLYGON((-89.99450683593753 21.279137394108716,-89.13757324218751 21.2996106049456,-89.30236816406251 20.68418377935238,-90.0494384765625 20.715015145512098,-89.99450683593753 21.279137394108716))", ('20151219', date(2015,12,29)), {"platformname":"Sentinel-2"})
>>> print len(products)
>>> print len(products)
3
3
...
...
geosentinel/Index.py
View file @
0b8048a9
...
@@ -25,10 +25,10 @@ class Index(object):
...
@@ -25,10 +25,10 @@ class Index(object):
>>> Ind="NBAI"
>>> Ind="NBAI"
>>> Indeex = Index("60", Ind)
>>> Indeex = Index("60", Ind)
>>> for image in list_files:
>>> for image in list_files:
>>>
file = dir + "/" + image
...
file = dir + "/" + image
>>>
print"Applying Index " + Ind + "... ", image
...
print"Applying Index " + Ind + "... ", image
>>>
product=Read.ReadFilesSentinel(file,2)
...
product=Read.ReadFilesSentinel(file,2)
>>>
Indeex.Index(product, file)
...
Indeex.Index(product, file)
"""
"""
...
...
geosentinel/Merge.py
View file @
0b8048a9
...
@@ -12,11 +12,9 @@ Test Case
...
@@ -12,11 +12,9 @@ Test Case
"""
"""
import
os
,
sys
import
os
,
sys
#sys.path.append(os.path.join(os.path.expandvars("%userprofile%"),".snap\snap-python"))
from
os.path
import
expanduser
from
os.path
import
expanduser
home
=
expanduser
(
"~"
)
home
=
expanduser
(
"~"
)
a
=
os
.
path
.
join
(
os
.
path
.
expandvars
(
home
),
".snap/snap-python/"
)
a
=
os
.
path
.
join
(
os
.
path
.
expandvars
(
home
),
".snap/snap-python/"
)
print
"SNAPPY.."
,
a
sys
.
path
.
append
(
a
)
sys
.
path
.
append
(
a
)
import
cv2
import
cv2
import
snappy
,
numpy
import
snappy
,
numpy
...
...
geosentinel/Resampling.py
View file @
0b8048a9
...
@@ -7,11 +7,9 @@ Example:
...
@@ -7,11 +7,9 @@ Example:
"""
"""
import
os
,
sys
import
os
,
sys
#sys.path.append(os.path.join(os.path.expandvars("%userprofile%"),".snap\snap-python"))
from
os.path
import
expanduser
from
os.path
import
expanduser
home
=
expanduser
(
"~"
)
home
=
expanduser
(
"~"
)
a
=
os
.
path
.
join
(
os
.
path
.
expandvars
(
home
),
".snap/snap-python/"
)
a
=
os
.
path
.
join
(
os
.
path
.
expandvars
(
home
),
".snap/snap-python/"
)
print
"SNAPPY.."
,
a
sys
.
path
.
append
(
a
)
sys
.
path
.
append
(
a
)
import
snappy
import
snappy
from
snappy
import
HashMap
,
jpy
,
Product
,
ProductData
,
ProductIO
,
ProductUtils
from
snappy
import
HashMap
,
jpy
,
Product
,
ProductData
,
ProductIO
,
ProductUtils
...
@@ -29,10 +27,10 @@ class Resampling(object):
...
@@ -29,10 +27,10 @@ class Resampling(object):
>>> Read=readProduct(dir,platform)
>>> Read=readProduct(dir,platform)
>>> Resam = Resampling("60")
>>> Resam = Resampling("60")
>>> for image in list_files:
>>> for image in list_files:
>>> file = dir + "/" +
image
... file=dir+"/"+
image
>>>
print"Applying Resampling... ", image
...
print"Applying Resampling... ", image
>>>
product=Read.ReadFilesSentinel(file,1)
...
product=Read.ReadFilesSentinel(file,1)
>>>
Resam.Resample(product, file)
...
Resam.Resample(product, file)
"""
"""
def
__init__
(
self
,
ResolSize
):
def
__init__
(
self
,
ResolSize
):
...
...
geosentinel/SubSet.py
View file @
0b8048a9
...
@@ -27,16 +27,16 @@ class SubSet(object):
...
@@ -27,16 +27,16 @@ class SubSet(object):
>>> list_files=Files.findFilesSentinel(dir,platform,3)
>>> list_files=Files.findFilesSentinel(dir,platform,3)
>>> print 'There is/are
%
d '
%
len(list_files) + platform + ' file(s)'
>>> print 'There is/are
%
d '
%
len(list_files) + platform + ' file(s)'
>>> Read=readProduct(dir,platform)
>>> Read=readProduct(dir,platform)
>>> widthX="
552
"
>>> widthX="
0
"
>>> heigthX="0"
>>> heigthX="0"
>>> widthY="
1764
"
>>> widthY="
588
"
>>> heigthY="
1080
"
>>> heigthY="
636
"
>>> SubSeet = SubSet("60", widthX, heigthX, widthY, heigthY)
>>> SubSeet = SubSet("60", widthX, heigthX, widthY, heigthY)
>>> for image in list_files:
>>> for image in list_files:
>>>
file = dir + "/" + image
...
file = dir + "/" + image
>>>
print"Applying SubSet... ", image
...
print"Applying SubSet... ", image
>>>
product=Read.ReadFilesSentinel(file,2)
...
product=Read.ReadFilesSentinel(file,2)
>>>
SubSeet.subSet(product, file)
...
SubSeet.subSet(product, file)
"""
"""
def
__init__
(
self
,
ResolSize
,
widthX
,
heigthX
,
widthY
,
heigthY
):
def
__init__
(
self
,
ResolSize
,
widthX
,
heigthX
,
widthY
,
heigthY
):
...
...
geosentinel/readProduct.py
View file @
0b8048a9
...
@@ -26,11 +26,11 @@ class readProduct(object):
...
@@ -26,11 +26,11 @@ class readProduct(object):
>>> print 'There is/are
%
d '
%
len(list_files) + platform + ' file(s)'
>>> print 'There is/are
%
d '
%
len(list_files) + platform + ' file(s)'
>>> Read=readProduct(dir,platform)
>>> Read=readProduct(dir,platform)
>>> for image in list_files:
>>> for image in list_files:
>>>
file = dir + "/" + image
...
file = dir + "/" + image
>>>
print"Reading image... ", image
...
print"Reading image... ", image
>>>
product=Read.ReadFilesSentinel(file,1)
...
product=Read.ReadFilesSentinel(file,1)
>>>
band_names = product.getBandNames()
...
band_names = product.getBandNames()
>>>
print("Bands:
%
s"
%
(list(band_names)))
...
print("Bands:
%
s"
%
(list(band_names)))
"""
"""
...
...
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