91 |
saver = ProjFileSaver(pf) |
saver = ProjFileSaver(pf) |
92 |
saver.write(pf.GetFilename()) |
saver.write(pf.GetFilename()) |
93 |
|
|
94 |
|
# |
95 |
# Constants for the get_system_proj_file function |
# Constants for the get_system_proj_file function |
96 |
|
# |
97 |
|
|
98 |
|
# The default projection file with a few predefined projections |
99 |
DEFAULT_PROJ_FILE = "defaults.proj" |
DEFAULT_PROJ_FILE = "defaults.proj" |
100 |
|
|
101 |
|
# The epsg projections. |
102 |
EPSG_PROJ_FILE = "epsg.proj" |
EPSG_PROJ_FILE = "epsg.proj" |
103 |
|
|
104 |
|
# Deprecated EPSG projections. |
105 |
|
EPSG_DEPRECATED_PROJ_FILE = "epsg-deprecated.proj" |
106 |
|
|
107 |
def get_system_proj_file(filename): |
def get_system_proj_file(filename): |
108 |
"""Return the projections from the indicated file and a list with warnings |
"""Return the projections from the indicated file and a list with warnings |
109 |
|
|
111 |
with Thuban's default projection files (Resources/Projections/). If |
with Thuban's default projection files (Resources/Projections/). If |
112 |
possible callers should not use hardwired string literal for the |
possible callers should not use hardwired string literal for the |
113 |
name to avoid unnecessary duplication. Instead they should use one |
name to avoid unnecessary duplication. Instead they should use one |
114 |
of the predefined constants, currently DEFAULT_PROJ_FILE or |
of the predefined constants, currently DEFAULT_PROJ_FILE, |
115 |
EPSG_PROJ_FILE. |
EPSG_PROJ_FILE or EPSG_DEPRECATED_PROJ_FILE. |
116 |
|
|
117 |
The return value is a tuple with the projections in a ProjFile |
The return value is a tuple with the projections in a ProjFile |
118 |
object and a list of strings with warning messages. The warnings |
object and a list of strings with warning messages. The warnings |