Changeset 1117
- Timestamp:
- 06/24/08 05:11:54
- Files:
-
- OWSLib/trunk/owslib/coverage/wcs110.py (modified) (1 diff)
- OWSLib/trunk/owslib/interfaces.py (modified) (1 diff)
- OWSLib/trunk/owslib/wms.py (modified) (4 diffs)
- OWSLib/trunk/tests/wms_JPLCapabilities.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OWSLib/trunk/owslib/coverage/wcs110.py
r1095 r1117 168 168 u = urlopen(base_url, data=data) 169 169 except: 170 u = urlopen(base_url+dat )170 u = urlopen(base_url+data) 171 171 172 172 # check for service exceptions, and return OWSLib/trunk/owslib/interfaces.py
r1095 r1117 129 129 crsOptions = property("""List of available coordinate/spatial reference systems (list).""") 130 130 styles = property("""List of style dicts (list).""") 131 131 timepositions=property("""List of times for which data is available""") 132 132 133 133 # XXX: needed? OWSLib/trunk/owslib/wms.py
r1102 r1117 99 99 100 100 #serviceIdentification metadata 101 serviceelem=self._capabilities.find('Service /')101 serviceelem=self._capabilities.find('Service') 102 102 self.identification=ServiceIdentification(serviceelem, self.version) 103 103 … … 320 320 self.boundingBox = None 321 321 if b is not None: 322 self.boundingBox = ( 323 float(b.attrib['minx']), 324 float(b.attrib['miny']), 325 float(b.attrib['maxx']), 326 float(b.attrib['maxy']), 327 b.attrib['SRS'], 328 ) 322 try: #sometimes the SRS attribute is (wrongly) not provided 323 srs=b.attrib['SRS'] 324 except KeyError: 325 srs=None 326 self.boundingBox = ( 327 float(b.attrib['minx']), 328 float(b.attrib['miny']), 329 float(b.attrib['maxx']), 330 float(b.attrib['maxy']), 331 srs, 332 ) 329 333 elif self.parent: 330 334 if hasattr(self.parent, 'boundingBox'): … … 350 354 ## instead of several SRS tags. hence the inner loop 351 355 for srslist in map(lambda x: x.text, elem.findall('SRS')): 356 if srslist: 352 357 for srs in srslist.split(): 353 358 self.crsOptions.append(srs) … … 376 381 self.keywords = [f.text for f in elem.findall('KeywordList/Keyword')] 377 382 383 # timepositions - times for which data is available. 384 self.timepositions=None 385 for extent in elem.findall('Extent'): 386 if extent.attrib.get("name").lower() =='time': 387 self.timepositions=extent.text.split(',') 388 break 389 378 390 self.layers = [] 379 391 for child in elem.findall('Layer'): OWSLib/trunk/tests/wms_JPLCapabilities.txt
r1097 r1117 108 108 ['application/vnd.ogc.se_xml'] 109 109 110 Lastly, test the getcapabilities method110 Lastly, test the getcapabilities and getmap methods 111 111 112 112 >>> wms = WebMapService('http://wms.jpl.nasa.gov/wms.cgi', version='1.1.1')
