15 |
BaseProjection = Projection.Projection |
BaseProjection = Projection.Projection |
16 |
del Projection |
del Projection |
17 |
|
|
18 |
|
PROJ_UNITS_METERS = 1 |
19 |
|
PROJ_UNITS_DEGREES = 2 |
20 |
|
|
21 |
class Projection(BaseProjection): |
class Projection(BaseProjection): |
22 |
|
|
23 |
"""A proj4 projection object that remembers the parameters""" |
"""A proj4 projection object that remembers the parameters""" |
78 |
"""Return list of 'parameter=value' strings""" |
"""Return list of 'parameter=value' strings""" |
79 |
return self.params |
return self.params |
80 |
|
|
81 |
|
def GetProjectedUnits(self): |
82 |
|
if self.GetParameter("proj") == "latlong": |
83 |
|
return PROJ_UNITS_DEGREES |
84 |
|
else: |
85 |
|
return PROJ_UNITS_METERS |
86 |
|
|
87 |
def __repr__(self): |
def __repr__(self): |
88 |
return self.name + ": " + repr(self.params) |
return self.name + ": " + repr(self.params) |
89 |
|
|