/[escript]/trunk/downunder/py_src/domainbuilder.py
ViewVC logotype

Diff of /trunk/downunder/py_src/domainbuilder.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4150 by caltinay, Mon Jan 21 04:14:24 2013 UTC revision 4201 by caltinay, Thu Feb 14 06:40:01 2013 UTC
# Line 62  class DomainBuilder(object): Line 62  class DomainBuilder(object):
62      def addSource(self, source):      def addSource(self, source):
63          """          """
64          Adds a survey data provider to the domain builder.          Adds a survey data provider to the domain builder.
65            An exception is raised if the domain has already been built or if the
66            UTM zone of `source` does not match the UTM zone of sources already
67            added to the domain builder.
68    
69          :param source: The data source to be added          :param source: The data source to be added
70          :type source: `DataSource`          :type source: `DataSource`
# Line 70  class DomainBuilder(object): Line 73  class DomainBuilder(object):
73              raise RuntimeError("Invalid call to addSource(). Domain is already built.")              raise RuntimeError("Invalid call to addSource(). Domain is already built.")
74          if not isinstance(source, DataSource):          if not isinstance(source, DataSource):
75              raise TypeError("source is not a DataSource")              raise TypeError("source is not a DataSource")
76    
77            if len(self.__sources)>0:
78                if self.__sources[0].getUtmZone() != source.getUtmZone():
79                    raise ValueError("It is not possible to combine data sources located in different UTM zones at the moment.")
80    
81          self.__sources.append(source)          self.__sources.append(source)
82    
83      def setFractionalPadding(self, pad_x=None, pad_y=None):      def setFractionalPadding(self, pad_x=None, pad_y=None):

Legend:
Removed from v.4150  
changed lines
  Added in v.4201

  ViewVC Help
Powered by ViewVC 1.1.26