SMAreaValueDescription Class Reference

Inherits SMWValueDescription.

List of all members.

Public Member Functions

 __construct (SMWDataItem $dataItem, $comparator, $radius)
 Constructor.
 getQueryString ($asValue=false)
 prune (&$maxsize, &$maxdepth, &$log)
 getBounds ()
 Returns the bounds of the area.
 getSQLCondition ($tableName, array $fieldNames, $dbs)

Protected Member Functions

 calculateBounds (SMWDIGeoCoord $dataItem, $radius)
 Sets the bounds fields to an array returned by SMAreaValueDescription::getBoundingBox.

Static Protected Member Functions

static getBoundingBox (array $centerCoordinates, $circleRadius)
 Returns the lat and lon limits of a bounding box around a circle defined by the provided parameters.
static geoFunctionsAreAvailable ()
 Returns a boolean indicating if MapsGeoFunctions is available.

Protected Attributes

 $bounds = false


Detailed Description

Definition at line 18 of file SM_AreaValueDescription.php.


Constructor & Destructor Documentation

SMAreaValueDescription::__construct ( SMWDataItem dataItem,
comparator,
radius 
)

Constructor.

Since:
0.6
Parameters:
SMWDataItem $dataItem
string $comparator
string $radius

Reimplemented from SMWValueDescription.

Definition at line 38 of file SM_AreaValueDescription.php.

References calculateBounds().


Member Function Documentation

SMAreaValueDescription::calculateBounds ( SMWDIGeoCoord dataItem,
radius 
) [protected]

Sets the bounds fields to an array returned by SMAreaValueDescription::getBoundingBox.

Since:
0.6
Parameters:
SMWDIGeoCoord $dataItem
string $radius

Definition at line 55 of file SM_AreaValueDescription.php.

Referenced by __construct().

SMAreaValueDescription::getQueryString ( asValue = false  ) 

See also:
SMWDescription:getQueryString
Since:
0.6
Parameters:
Boolean $asValue

Reimplemented from SMWValueDescription.

Definition at line 69 of file SM_AreaValueDescription.php.

References SMWValueDescription::getDataItem(), and SMWDataValueFactory::newDataItemValue().

Referenced by prune().

SMAreaValueDescription::prune ( &$  maxsize,
&$  maxdepth,
&$  log 
)

SMAreaValueDescription::getBounds (  ) 

Returns the bounds of the area.

Since:
0.6
Returns:
array

Definition at line 105 of file SM_AreaValueDescription.php.

SMAreaValueDescription::getSQLCondition ( tableName,
array $  fieldNames,
dbs 
)

See also:
SMWDescription::getSQLCondition
Since:
0.6
Parameters:
string $tableName
array $fieldNames
DatabaseBase or Database $dbs
Returns:
string or false

Definition at line 120 of file SM_AreaValueDescription.php.

References SMWValueDescription::getComparator(), SMWValueDescription::getDataItem(), and SMWDataItem::TYPE_GEO.

static SMAreaValueDescription::getBoundingBox ( array $  centerCoordinates,
circleRadius 
) [static, protected]

Returns the lat and lon limits of a bounding box around a circle defined by the provided parameters.

Since:
0.6
Parameters:
array $centerCoordinates Array containing non-directional float coordinates with lat and lon keys.
float $circleRadius The radius of the circle to create a bounding box for, in m.
Returns:
An associative array containing the limits with keys north, east, south and west.

Definition at line 162 of file SM_AreaValueDescription.php.

static SMAreaValueDescription::geoFunctionsAreAvailable (  )  [static, protected]

Returns a boolean indicating if MapsGeoFunctions is available.

Since:
0.6
Returns:
boolean

Definition at line 183 of file SM_AreaValueDescription.php.


Member Data Documentation

SMAreaValueDescription::$bounds = false [protected]

Definition at line 27 of file SM_AreaValueDescription.php.


The documentation for this class was generated from the following file:

Generated on Sun Mar 18 07:15:42 2012 for Semantic MediaWiki by  doxygen 1.5.6