Changeset 2897 for TI05-delivery


Ignore:
Timestamp:
19/09/07 08:32:36 (12 years ago)
Author:
domlowe
Message:

Added proxyname to development.ini. Needed for wcs retrieval and demo today, cannot see another way of getting at it. Also some changes to 3D bounding box validator to allow CRS atttribute

Location:
TI05-delivery/ows_framework/trunk/ows_server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/development.ini

    r2860 r2897  
    3232ows_common_config = %(here)s/eg_ows_capabilities.xml 
    3333configfile = %(here)s/ndgDiscovery.config 
     34proxyname= ndgbeta.badc.rl.ac.uk 
    3435#the password file needs to be outside the egg: 
    3536#passwordFile =  %(here)s/passwords.txt   
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_wcs.py

    r2892 r2897  
    312312                    #STORE=true, STATUS = false: Return Coverage XML document with link to file. 
    313313                    #use the temp file name (minus extension) as an ID 
    314                     c.hyperlink = 'http://'+request.environ['HTTP_HOST']+'/'+os.path.basename(request.environ['paste.config']['app_conf']['publish_dir'])+'/'+os.path.basename(filename) 
     314 
     315                    try: 
     316                        hostname=request.environ['paste.config']['app_conf']['proxyname'] 
     317                    except: 
     318                        hostname=hostname=request.environ['HTTP_HOST']                     
     319                    c.hyperlink ='http://'+hostname+'/'+os.path.basename(request.environ['paste.config']['app_conf']['publish_dir'])+'/'+os.path.basename(filename) 
    315320                    r=render_response('wcs_getCoverageResponse', format='xml') 
    316321                    r.headers['content-type'] = 'text/xml' 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/validators.py

    r2848 r2897  
    4242def bbox_2or3d(bbox): 
    4343    """ 
     44    WCS style bounding box: "minX , minY, maxX, maxY, srsName" 
     45    WCS style bounding box: "minX , minY, maxX, maxY, srsName" 
    4446    Checks it's a 2D or 3D BBOX and parse it into a tuple of floats. 
    4547 
    46     """ 
    47  
     48    """    
     49    bboxlist=bbox.split(',') 
     50    if len(bboxlist) in [5,7]: 
     51        #strip off the crs argument as we don't use it.. 
     52        temp = bboxlist[:-1] 
     53        bboxlist=temp 
    4854    try: 
    49         bbox_t = [float(x) for x in bbox.split(',')] 
     55        bbox_t = [float(x) for x in bboxlist] 
    5056    except ValueError: 
    5157        raise InvalidParameterValue("Incorrect BBOX specification %s" % bbox, 'bbox') 
    52  
    53     if len(bbox_t) not in [4,6]: 
     58   
     59    if len(bbox_t) not in [4,6]:         
     60        #should either have two or 3 pairs now 
    5461        raise InvalidParameterValue("Incorrect BBOX specification %s" % bbox, 'bbox') 
    5562 
Note: See TracChangeset for help on using the changeset viewer.