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

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

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

revision 2085 by jan, Wed Nov 12 08:26:56 2003 UTC revision 2086 by bh, Fri Feb 20 20:09:25 2004 UTC
# Line 1  Line 1 
1  # Copyright (C) 2003 by Intevation GmbH  # Copyright (C) 2003, 2004 by Intevation GmbH
2  # Authors:  # Authors:
3  # Jan-Oliver Wagner <[email protected]>  # Jan-Oliver Wagner <[email protected]>
4  #  #
# Line 33  from ogclib.WMSClient import WMSClient Line 33  from ogclib.WMSClient import WMSClient
33  from Thuban.Model.layer import BaseLayer  from Thuban.Model.layer import BaseLayer
34  from Thuban.Model.proj import Projection  from Thuban.Model.proj import Projection
35  from Thuban.Model.extension import Extension  from Thuban.Model.extension import Extension
36  from Thuban.Model.resource import read_proj_file  from Thuban.Model.resource import get_system_proj_file, EPSG_PROJ_FILE, \
37         EPSG_DEPRECATED_PROJ_FILE
38  from Thuban.UI.command import registry, Command  from Thuban.UI.command import registry, Command
39  import Thuban.UI.mainwindow  import Thuban.UI.mainwindow
40  from Thuban import _  from Thuban import _
# Line 43  import Thuban.UI.baserenderer Line 44  import Thuban.UI.baserenderer
44  def epsg_code_to_projection(epsg):  def epsg_code_to_projection(epsg):
45      """Find the projection for the given epsg code.      """Find the projection for the given epsg code.
46    
47      epsg -- EPSG code as string      epsg -- EPSG code as string
48      """      """
49      proj_file, warnings = read_proj_file("Resources/Projections/epsg.proj")      proj_file, warnings = get_system_proj_file(EPSG_PROJ_FILE)
50    
51      for proj in proj_file.GetProjections():      for proj in proj_file.GetProjections():
52          if proj.EPSGCode() == epsg:          if proj.EPSGCode() == epsg:
53              return proj              return proj
54      proj_file, warnings = read_proj_file("Resources/Projections/epsg-deprecated.proj")      proj_file, warnings = get_system_proj_file(EPSG_DEPRECATED_PROJ_FILE)
55      for proj in proj_file.GetProjections():      for proj in proj_file.GetProjections():
56          if proj.EPSGCode() == epsg:          if proj.EPSGCode() == epsg:
57              return proj              return proj

Legend:
Removed from v.2085  
changed lines
  Added in v.2086

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26