Esempio n. 1
0
def main():
    """
        Command Line interface to the general purpose WCS client (wcs_client.py) 
        for WCS 2.0/EO-WCS server access
        This cmd-line interface handles all functionalities as described in 
        the EOxServer ver.0.3 documentation 
        (http://eoxserver.org/doc/en/users/EO-WCS_request_parameters.html)
        It offers cmd-line execution of:
          - GetCapabilities Request
          - DescribeCoverage Request
          - DescribeEOCoverageSet Request
          - GetMap Request
    """
   # print "I'm in "+sys._getframe().f_code.co_name

        # get all parameters provided via cmd-line
    input_params = _get_cmdline()

        # execute the user selected Request-type
    if input_params.has_key('request'):
        to_call = input_params.get('request')

    wcs_call = wcs_client.wcsClient()

    exec "result = wcs_call."+to_call+"(input_params)"

    print result
Esempio n. 2
0
import time

import wcs_client




#======== Testing CryoLand

input_params1={'request': 'GetCoverage','server_url': 'http://neso.cryoland.enveo.at/cryoland/ows?',  'coverageid': 'FSC_0.005deg_201404080650_201404081155_MOD_panEU_ENVEOV2.1.00.tif', 'subset_x': '28,30','subset_y': '59,61', 'format': 'jpeg'}
input_params2={'request': 'DescribeEOCoverageSet', 'server_url': 'http://neso.cryoland.enveo.at/cryoland/ows?' , 'eoID': 'daily_FSC_PanEuropean_Optical', 'subset_lon' :'28,30', 'subset_lat': '59,61' , 'subset_time':  '2012-03-17,2012-03-19T12:00:00Z' ,   'IDs_only':True}

input_params3={'request': 'GetCoverage','server_url': 'http://neso.cryoland.enveo.at/cryoland/ows?', 'output':'/home/schillerc/cs_pylib/wcs_client/EOxWCSClient', 'coverageID': elem, 'subset_x' :'28,30', 'subset_y': '59,61', 'format': 'tiff' }


new = wcs_client.wcsClient()
result = new.DescribeEOCoverageSet(input_paramsD1a)

###
#   result=[u'FSC_0.005deg_201203170655_201203171155_MOD_panEU_ENVEOV2.1.00.tif', u'FSC_0.005deg_201203180730_201203181235_MOD_panEU_ENVEOV2.1.00.tif', u'FSC_0.005deg_201203190815_201203191145_MOD_panEU_ENVEOV2.1.00.tif']

elem=''
if len(result) > 0:
    for elem in result:
        print elem
        #print 'ID',input_params3['coverageID']
        input_paramsD1b['coverageID']=elem
        #print 'ID',input_params3['coverageID']
        new.GetCoverage(input_paramsD1b)
else:
    print 'No Coverages available'
# THE SOFTWARE.
#-------------------------------------------------------------------------------
#
#

import sys
import os
import os.path
import time
import fnmatch
import datetime

from util import parse_xml, print_log

import wcs_client
wcs = wcs_client.wcsClient()



#/************************************************************************/
#/*                            findfile()                                */
#/************************************************************************/


def findfile(indir, inmask):
    """
        literal_directory, basename_pattern (simple shell-style wildcards), includes dot-files
        no regex, but constructs like e.g. L5_[!a-f]*.tif , are possible
    """
    filelist = []
    for root, dd, files in os.walk(indir):