Skip to content

Commit

Permalink
Remove old unnecessary Proj subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
djhoese committed Aug 8, 2023
1 parent e38b675 commit 49e5d23
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions polar2grid/core/proj.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,7 @@

import sys

try:
from pyproj import Proj as BaseProj
except ImportError:
# This module is loaded by meta.py which could be all a user needs so we shouldn't fail if they don't have pyproj
import warnings

warnings.warn("Package 'pyproj' could not be imported. Some functionality will be missing", stacklevel=2)
Proj = object


class Proj(BaseProj):
def is_latlong(self):
if hasattr(self, "crs"):
return self.crs.is_geographic
return super(Proj, self).is_latlong()

def __call__(self, data1, data2, **kwargs):
if self.is_latlong():
return data1, data2

return super(Proj, self).__call__(data1, data2, **kwargs)
from pyproj import Proj


def get_parser():
Expand Down

0 comments on commit 49e5d23

Please sign in to comment.