2009-01-16 03:35:04 +08:00
|
|
|
"""
|
|
|
|
This module holds simple classes used by GeoQuery.convert_values
|
|
|
|
to convert geospatial values from the database.
|
|
|
|
"""
|
2009-03-31 01:15:49 +08:00
|
|
|
|
2009-01-16 03:35:04 +08:00
|
|
|
class BaseField(object):
|
2009-12-22 23:18:51 +08:00
|
|
|
empty_strings_allowed = True
|
2013-10-22 18:21:07 +08:00
|
|
|
|
2009-01-16 03:35:04 +08:00
|
|
|
def get_internal_type(self):
|
|
|
|
"Overloaded method so OracleQuery.convert_values doesn't balk."
|
|
|
|
return None
|
|
|
|
|
|
|
|
class AreaField(BaseField):
|
|
|
|
"Wrapper for Area values."
|
|
|
|
def __init__(self, area_att):
|
|
|
|
self.area_att = area_att
|
|
|
|
|
|
|
|
class DistanceField(BaseField):
|
|
|
|
"Wrapper for Distance values."
|
|
|
|
def __init__(self, distance_att):
|
|
|
|
self.distance_att = distance_att
|
|
|
|
|
|
|
|
class GeomField(BaseField):
|
|
|
|
"""
|
2013-10-11 04:42:30 +08:00
|
|
|
Wrapper for Geometry values. It is a lightweight alternative to
|
2013-09-06 06:23:48 +08:00
|
|
|
using GeometryField (which requires an SQL query upon instantiation).
|
2009-01-16 03:35:04 +08:00
|
|
|
"""
|
|
|
|
pass
|