<s> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> class Point ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , lat , lon ) : <EOL> """<STR_LIT>""" <EOL> if - <NUM_LIT> > lat or lat > <NUM_LIT> : <EOL> raise ValueError ( "<STR_LIT>" % lat ) <EOL> if - <NUM_LIT> > lon or lon > <NUM_LIT> : <EOL> raise ValueError ( "<STR_LIT>" % lon ) <EOL> self . lat = lat <EOL> self . lon = lon <EOL> def __eq__ ( self , other ) : <EOL> return self . lat == other . lat and self . lon == other . lon <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT>' % ( self . lat , self . lon ) <EOL> class Box ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , north , east , south , west ) : <EOL> if south > north : <EOL> south , north = north , south <EOL> self . _ne = Point ( north , east ) <EOL> self . _sw = Point ( south , west ) <EOL> north_east = property ( lambda self : self . _ne ) <EOL> south_west = property ( lambda self : self . _sw ) <EOL> def _set_north ( self , val ) : <EOL> if val < self . _sw . lat : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> self . _ne . lat = val <EOL> north = property ( lambda self : self . _ne . lat , _set_north ) <EOL> def _set_east ( self , val ) : <EOL> self . _ne . lat = val <EOL> east = property ( lambda self : self . _ne . lon , _set_east ) <EOL> def _set_south ( self , val ) : <EOL> if val > self . _ne . lat : <EOL> raise ValueError ( "<STR_LIT>" ) <EOL> self . _sw . lat = val <EOL> south = property ( lambda self : self . _sw . lat , _set_south ) <EOL> def _set_west ( self , val ) : <EOL> self . _sw . lon = val <EOL> west = property ( lambda self : self . _sw . lon , _set_west ) <EOL> def __eq__ ( self , other ) : <EOL> return self . _ne == other . _ne and self . _sw == other . _sw <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT>' % ( self . north , self . east , <EOL> self . south , self . west ) </s>
