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: |
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 |
|
|