EOX GitLab Instance

Commit 5f84b3f1 authored by Martin Paces's avatar Martin Paces
Browse files

New element factories for eop:browse and eop:product.

parent cb0592e2
......@@ -143,14 +143,56 @@ def getFootprint( geom ):
return E.Footprint(gml.getId(),getMultiExtentOf(geom,"EPSG:4326"))
def getMask( type, format, srs, geom = None , url = None, post=None ) :
def getBrowse( type, srs, url, subtype=None):
tmp = [
E.type( type ) ,
E.format( format ) ,
]
if subtype :
tmp.append(E.subType(subtype))
ex_srs = "urn:ogc:def:crs:EPSG:6.3:%s"%( srs.split(':')[-1] )
tmp.append( E.referenceSystemIdentifier(ex_srs,{"codeSpace":"EPSG"}) )
tmp.append(E.fileName(ows.getServiceReference(url)))
return E.browse( E.BrowseInformation( *tmp ) )
def getProduct( srs, url, version=None, size=None, timeliness=None ):
tmp = []
if srs :
ex_srs = "urn:ogc:def:crs:EPSG:6.3:%s"%( srs.split(':')[-1] )
tmp.append( E.referenceSystemIdentifier(ex_srs,{"codeSpace":"EPSG"}) )
tmp.append(E.fileName(ows.getServiceReference(url)))
if version :
tmp.append( E.version( version ) )
if size :
tmp.append( E.size( size ) )
if timeliness :
tmp.append( E.timeliness( timeliness ) )
tmp.append(E.fileName(ows.getServiceReference(url)))
return E.product( E.ProductInformation( *tmp ) )
def getMask( type, format, srs=None, geom=None, url=None, post=None, subtype=None ):
tmp = [
E.type( type ) ,
E.format( format ) ,
]
if subtype :
tmp.append(E.subType(subtype))
if srs :
ex_srs = "urn:ogc:def:crs:EPSG:6.3:%s"%( srs.split(':')[-1] )
tmp.append( E.referenceSystemIdentifier(ex_srs,{"codeSpace":"EPSG"}) )
......
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