Return-Path: X-Original-To: apmail-climate-commits-archive@minotaur.apache.org Delivered-To: apmail-climate-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 45EEE10ACB for ; Fri, 16 Aug 2013 14:25:14 +0000 (UTC) Received: (qmail 46107 invoked by uid 500); 16 Aug 2013 14:25:14 -0000 Delivered-To: apmail-climate-commits-archive@climate.apache.org Received: (qmail 46078 invoked by uid 500); 16 Aug 2013 14:25:12 -0000 Mailing-List: contact commits-help@climate.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.incubator.apache.org Delivered-To: mailing list commits@climate.incubator.apache.org Received: (qmail 46071 invoked by uid 99); 16 Aug 2013 14:25:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 14:25:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Aug 2013 14:25:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 454ED2388900; Fri, 16 Aug 2013 14:24:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1514725 - /incubator/climate/branches/RefactorInput/ocw/dataset.py Date: Fri, 16 Aug 2013 14:24:51 -0000 To: commits@climate.incubator.apache.org From: joyce@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130816142451.454ED2388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: joyce Date: Fri Aug 16 14:24:50 2013 New Revision: 1514725 URL: http://svn.apache.org/r1514725 Log: CLIMATE-254 - Add lat_min property Modified: incubator/climate/branches/RefactorInput/ocw/dataset.py Modified: incubator/climate/branches/RefactorInput/ocw/dataset.py URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/dataset.py?rev=1514725&r1=1514724&r2=1514725&view=diff ============================================================================== --- incubator/climate/branches/RefactorInput/ocw/dataset.py (original) +++ incubator/climate/branches/RefactorInput/ocw/dataset.py Fri Aug 16 14:24:50 2013 @@ -131,7 +131,7 @@ class Dataset: return time_resolution -class Bounds: +class Bounds(object): '''Container for holding spatial and temporal bounds information. Certain operations require valid bounding information to be present for @@ -142,6 +142,7 @@ class Bounds: * Latitude values must be in the range [-90, 90] * Longitude values must be in the range [-180, 180] + * Lat/Lon Min values must be less than the corresponding Lat/Lon Max values. * Temporal bounds must a valid datetime object ''' @@ -174,3 +175,15 @@ class Bounds: self._lon_max = lon_max self._start = start self._end = end + + @property + def lat_min(self): + print self._lat_min + return self._lat_min + + @lat_min.setter + def lat_min(self, value): + if not (-90 <= value <= 90 and value < self._lat_max): + raise ValueError("Attempted to set lat_min to invalid value.") + + self._lat_min = value