Example #1
 def load(self):
     query = Query(self._connection)
     query.SELECT("gid", self.name)
     query.SELECT("the_geom", self.name, "AsText")
     query.SELECT(self._primary, self.name)
     for key, gen in self._fields:
         query.SELECT(key, self.name)
     whereList = []
         for entry in self._subset:
             item = self.name + "." + self._primary + "='" + entry + "'"
             query.where = " OR ".join(whereList)
     except TypeError:
     polyDict = PolygonDictionary()
     pairs = []
     for entry in query:
         d = []
         for key, gen in self._fields:
             d.append((gen, entry[key]))
         data = Dictionary()
         p = GeneralizedPolygon(enum.ABSTRACT, entry["gid"], entry["the_geom"], data, self)
         polyKey = keygen(entry[self._primary])
         pairs.append((polyKey, p))
     return polyDict
Example #2
 def addField(self, fieldName):
     key = keygen(fieldName)
     self._fields.update({fieldName: key})
     return key
Example #3
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,                                                            
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES                                                            
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND                                                                   
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT                                                                
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,                                                               
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING                                                               
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR                                                              
    OTHER DEALINGS IN THE SOFTWARE.                                                                                            

from utils import keygen

R = keygen ('R')
DB = keygen ('DB')
SHP = keygen ('SHP')

PASS = keygen ('PASS')

MEAN = keygen ('MEAN')
SUM = keygen ('SUM')
COUNT = keygen ('COUNT')
MAX = keygen ('MAX')
MIN = keygen ('MIN')
SD = keygen ('SD')

BAR = keygen ('BAR')
BOX = keygen ('BOX')
SCATTER = keygen ('SCATTER')