Update

parent 17335915
......@@ -19,7 +19,7 @@ class APISentinel(object):
>>> sentinel = APISentinel('asalazarg', 'geo135asg')
>>> dir="make"
>>> 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"})
>>> print len(products)
3
......
......@@ -25,10 +25,10 @@ class Index(object):
>>> Ind="NBAI"
>>> Indeex = Index("60", Ind)
>>> for image in list_files:
>>> file = dir + "/" + image
>>> print"Applying Index " + Ind + "... ", image
>>> product=Read.ReadFilesSentinel(file,2)
>>> Indeex.Index(product, file)
... file = dir + "/" + image
... print"Applying Index " + Ind + "... ", image
... product=Read.ReadFilesSentinel(file,2)
... Indeex.Index(product, file)
"""
......
......@@ -12,11 +12,9 @@ Test Case
"""
import os,sys
#sys.path.append(os.path.join(os.path.expandvars("%userprofile%"),".snap\snap-python"))
from os.path import expanduser
home = expanduser("~")
a=os.path.join(os.path.expandvars(home),".snap/snap-python/")
print"SNAPPY..",a
sys.path.append(a)
import cv2
import snappy,numpy
......
......@@ -7,11 +7,9 @@ Example:
"""
import os,sys
#sys.path.append(os.path.join(os.path.expandvars("%userprofile%"),".snap\snap-python"))
from os.path import expanduser
home = expanduser("~")
a=os.path.join(os.path.expandvars(home),".snap/snap-python/")
print"SNAPPY..",a
sys.path.append(a)
import snappy
from snappy import HashMap,jpy,Product,ProductData,ProductIO,ProductUtils
......@@ -29,10 +27,10 @@ class Resampling(object):
>>> Read=readProduct(dir,platform)
>>> Resam = Resampling("60")
>>> for image in list_files:
>>> file = dir + "/" + image
>>> print"Applying Resampling... ", image
>>> product=Read.ReadFilesSentinel(file,1)
>>> Resam.Resample(product, file)
... file=dir+"/"+image
... print"Applying Resampling... ", image
... product=Read.ReadFilesSentinel(file,1)
... Resam.Resample(product, file)
"""
def __init__(self,ResolSize):
......
......@@ -27,16 +27,16 @@ class SubSet(object):
>>> list_files=Files.findFilesSentinel(dir,platform,3)
>>> print 'There is/are %d ' % len(list_files) + platform + ' file(s)'
>>> Read=readProduct(dir,platform)
>>> widthX="552"
>>> widthX="0"
>>> heigthX="0"
>>> widthY="1764"
>>> heigthY="1080"
>>> widthY="588"
>>> heigthY="636"
>>> SubSeet = SubSet("60", widthX, heigthX, widthY, heigthY)
>>> for image in list_files:
>>> file = dir + "/" + image
>>> print"Applying SubSet... ", image
>>> product=Read.ReadFilesSentinel(file,2)
>>> SubSeet.subSet(product, file)
... file = dir + "/" + image
... print"Applying SubSet... ", image
... product=Read.ReadFilesSentinel(file,2)
... SubSeet.subSet(product, file)
"""
def __init__(self,ResolSize,widthX,heigthX,widthY,heigthY):
......
......@@ -26,11 +26,11 @@ class readProduct(object):
>>> print 'There is/are %d ' % len(list_files) + platform + ' file(s)'
>>> Read=readProduct(dir,platform)
>>> for image in list_files:
>>> file = dir + "/" + image
>>> print"Reading image... ", image
>>> product=Read.ReadFilesSentinel(file,1)
>>> band_names = product.getBandNames()
>>> print("Bands: %s" % (list(band_names)))
... file = dir + "/" + image
... print"Reading image... ", image
... product=Read.ReadFilesSentinel(file,1)
... band_names = product.getBandNames()
... print("Bands: %s" % (list(band_names)))
"""
......
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