/[thuban]/branches/WIP-pyshapelib-bramz/Extensions/wms/parser.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Extensions/wms/parser.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2165 by joey, Tue Apr 13 16:42:48 2004 UTC revision 2170 by joey, Tue Apr 13 17:21:19 2004 UTC
# Line 170  class WMSCapabilitiesParser: Line 170  class WMSCapabilitiesParser:
170                  if srs[0:5] == 'EPSG:':                  if srs[0:5] == 'EPSG:':
171                      srs = srs[5:]                      srs = srs[5:]
172                  try:                  try:
173                      self.layers[index]['srs'].append(srs)                      int(srs)
174                  except KeyError:                      try:
175                      self.layers[index]['srs'] = [srs]                          self.layers[index]['srs'].append(srs)
176                        except KeyError:
177                            self.layers[index]['srs'] = [srs]
178                    except ValueError:
179                        if srs[0:4].upper() == 'AUTO' \
180                               or srs[0:4].upper() == 'NONE':
181                            try:
182                                self.layers[index]['_srs_'].append(srs)
183                            except KeyError:
184                                self.layers[index]['_srs_'] = [srs]
185                        else:
186                            self.error.append(_("SRS '%s' is not numerical and not"
187                                                " AUTO/NONE in layer '%s'") \
188                                              % (srs, self.layers[index]['title']))
189    
190          foo = getElementByName(top, 'LatLonBoundingBox')          foo = getElementByName(top, 'LatLonBoundingBox')
191          if foo is not None:          if foo is not None:
# Line 445  class WMSCapabilitiesParser: Line 458  class WMSCapabilitiesParser:
458                              if srs in pivot['bbox']:                              if srs in pivot['bbox']:
459                                  return pivot['bbox'][srs]                                  return pivot['bbox'][srs]
460    
461            # No matching BBox found, let's see if it was EPSG:4326
462            if srs == '4326':
463                return self.getLayerLatLonBBox(name)
464    
465          return None          return None
466    
467    

Legend:
Removed from v.2165  
changed lines
  Added in v.2170

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26