Package upoints :: Module cellid :: Class Cell
[hide private]
[frames] | no frames]

Class Cell

 object --+    
          |    
point.Point --+
              |
             Cell

Class for representing a cellular cite from OpenCellID.org

Since: 0.11.0

Instance Methods [hide private]
 
__init__(self, ident, latitude, longitude, mcc, mnc, lac, cellid, crange, samples, created, updated)
Initialise a new Cell object
str
__str__(self, mode=None)
OpenCellID.org-style location string

Inherited from point.Point: __dict__, __eq__, __hash__, __ne__, __repr__, __unicode__, bearing, destination, distance, final_bearing, forward, inverse, midpoint, sun_events, sunrise, sunset, to_grid_locator

Inherited from point.Point (private): _set_location

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__

Instance Variables [hide private]
  cellid
Cell's identifier
  crange
Cell's range
  created
Date the cell was first entered
int ident
OpenCellID database identifier
  lac
Cell's local area code
  latitude
Location's latitude
  longitude
Locations's longitude
  mcc
Cell's country code
  mnc
Cell's network code
  samples
Number of samples for the cell
  updated
Date of the last update

Inherited from point.Point: rad_latitude, rad_longitude, timezone, units

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ident, latitude, longitude, mcc, mnc, lac, cellid, crange, samples, created, updated)
(Constructor)

 

Initialise a new Cell object

>>> Cell(4, 52.015, -0.221, 21, 46, 40000, 10, 0, 1,
...      datetime.datetime(2008, 4, 15, 15, 21, 35),
...      datetime.datetime(2008, 4, 15, 15, 28, 49))
Cell(4, 52.015, -0.221, 21, 46, 40000, 10, 0, 1,
     datetime.datetime(2008, 4, 15, 15, 21, 35),
     datetime.datetime(2008, 4, 15, 15, 28, 49))
Parameters:
  • ident (int) - OpenCellID database identifier
  • latitude (float) - Cell's latitude
  • longitude (float) - Cell's longitude
  • mcc (int) - Cell's country code
  • mnc (int) - Cell's network code
  • lac (int) - Cell's local area code
  • cellid (int) - Cell's identifier
  • crange (int) - Cell's range
  • samples (int) - Number of samples for the cell
  • created (datetime.datetime) - Date the cell was first entered
  • updated (datetime.datetime) - Date of the last update
Raises:
  • ValueError - Unknown value for angle
  • ValueError - Unknown value for units
  • ValueError - Invalid value for latitude or longitude
Overrides: object.__init__

__str__(self, mode=None)
(Informal representation operator)

 

OpenCellID.org-style location string

>>> print(Cell(4, 52.015, -0.221, 21, 46, 40000, 10, 0, 1,
...       datetime.datetime(2008, 4, 15, 15, 21, 35),
...       datetime.datetime(2008, 4, 15, 15, 28, 49)))
4,52.0150000000000,-0.221000000000000,21,46,40000,10,0,1,2008-04-15 15:21:35,2008-04-15 15:28:49
Parameters:
  • mode (any) - For compatibility with parent class
Returns: str
OpenCellID.org-style string representation of Cell object
Raises:
  • ValueError - Unknown value for mode
Overrides: object.__str__

See Also: point.Point