Skip to content

Commit

Permalink
OSNI projection.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjlittle committed May 1, 2013
1 parent fec8379 commit fbbec9f
Show file tree
Hide file tree
Showing 6 changed files with 490 additions and 94 deletions.
9 changes: 9 additions & 0 deletions docs/source/whats_new.rst
@@ -1,3 +1,12 @@
What's new in Cartopy 0.8
*************************

:Release: 0.8.0
:Data: ?? ??? 2013

* Bill Little added support for the OSNI projection and enhanced the image nest capability. (:pull:`263`)


What's new in Cartopy 0.7
*************************

Expand Down
30 changes: 30 additions & 0 deletions lib/cartopy/crs.py
Expand Up @@ -552,6 +552,36 @@ def y_limits(self):
return (0, 13e5)


class OSNI(Projection):
def __init__(self):
proj4_params = {'proj': 'tmerc', 'lat_0': 53.5, 'lon_0': -8,
'k': 1.000035, 'x_0': 200000, 'y_0': 250000,
'a': 6377340.189, 'b': 6356034.447938534,
'units': 'm', 'no_defs': ''}
super(OSNI, self).__init__(proj4_params)

@property
def threshold(self):
return 1e4

@property
def boundary(self):
x0, x1 = self.x_limits
w = x1 - x0
y0, y1 = self.y_limits
h = y1 - y0
# XXX Should this be a LinearRing?
return sgeom.LineString([(0, 0), (0, h), (w, h), (w, 0), (0, 0)])

@property
def x_limits(self):
return (18814.9667, 386062.3293)

@property
def y_limits(self):
return (11764.8481, 464720.9559)


class EuroPP(Projection):
"""
UTM Zone 32 projection for EuroPP domain.
Expand Down

0 comments on commit fbbec9f

Please sign in to comment.