source: cows/trunk/cows/pylons/templates/wms_capabilities_json_g04.txt @ 4164

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/trunk/cows/pylons/templates/wms_capabilities_json_g04.txt@4164
Revision 4164, 1.2 KB checked in by spascoe, 11 years ago (diff)

Filename typo

Line 
1# Converted WMS-capabilities 1.3.0 XML to JSON
2# This version works with Genshi 0.4
3{
4#for ds in c.capabilities.contents.datasetSummaries
5  "${ds.identifier}": {
6    "title": "${ds.titles[0]}",
7    #if len(ds.abstracts)>0
8    "abstract": "${ds.abstracts[0]}",
9    #end
10    "crss": [${','.join([`x` for x in ds.CRSs])}],
11    #with exBBox = ds.wgs84BoundingBoxes[0]
12    "exbbox": [${exBBox.lowerCorner[0]}, ${exBBox.lowerCorner[1]}, ${exBBox.upperCorner[0]}, ${exBBox.upperCorner[1]}],
13    #end
14    "bboxes": {
15    #for bb in ds.boundingBoxes
16      "${bb.crs}": [${'%.2f'%bb.lowerCorner[0]}, ${'%.2f'%bb.lowerCorner[1]}, ${'%.2f'%bb.upperCorner[0]}, ${'%.2f'%bb.upperCorner[1]}]
17    #if bb!=ds.boundingBoxes[-1]
18    ,
19    #end
20    #end
21    },
22    "dimensions": {
23    #with d_ns = ds.dimensions.keys()
24    #for d_n in d_ns
25      "${d_n}": {
26        "units": "${ds.dimensions[d_n].valuesUnit}",
27        "unitSymbol": "${ds.dimensions[d_n].unitSymbol}",
28        "default": "${ds.dimensions[d_n].defaultValue}",
29        "extent": [${','.join([`x` for x in ds.dimensions[d_n].possibleValues.allowedValues])}]
30      }
31    #if d_n!=d_ns[-1]
32    ,
33    #end
34    #end
35    #end
36    }
37  }
38  #if ds != c.capabilities.contents.datasetSummaries[-1]
39  ,
40  #end
41  #end
42}
Note: See TracBrowser for help on using the repository browser.