#NEWLINE# def area( self , tolerance = 0.05 , **kwargs ) : #NEWLINE# #INDENT# '\n        Returns the area of the geographic field in an `area` attribute on \n        each element of this GeoQuerySet.\n        ' #NEWLINE# ( procedure_args , geo_field ) = self . _spatial_setup ( 'area' , field_name = kwargs . get ( 'field_name' , None ) ) #NEWLINE# s = { #NEWLINE# #INDENT# 'procedure_args' : procedure_args , #NEWLINE# 'geo_field' : geo_field , #NEWLINE# 'setup' : False , #NEWLINE# #UNINDENT# } #NEWLINE# if SpatialBackend . oracle : #NEWLINE# #INDENT# s [ 'procedure_fmt' ] = '%(geo_col)s,%(tolerance)s' #NEWLINE# s [ 'procedure_args' ] [ 'tolerance' ] = tolerance #NEWLINE# s [ 'select_field' ] = AreaField ( 'sq_m' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if SpatialBackend . postgis : #NEWLINE# #INDENT# if ( not geo_field . geodetic ) : #NEWLINE# #INDENT# s [ 'select_field' ] = AreaField ( Area . unit_attname ( geo_field . _unit_name ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( 'Area on geodetic coordinate systems not supported.' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return self . _spatial_attribute ( 'area' , s , ** geo_field )