Plugins
[ class tree: Plugins ] [ index: Plugins ] [ all elements ]

Class: ByXyQueryableLayer

Source Location: /plugins/toolTips/client/QueryableLayer.php

Class Overview

QueryableLayer
   |
   --ByXyQueryableLayer

QueryableLayer classes for toolTips plugin Extensible classes to build a tooltip layer definition


Author(s):

Version:

  • $Id: QueryableLayer.php,v 1.1 2006/08/25 15:49:43 pgiraud Exp $

Copyright:

  • 2005 Camptocamp SA

Variables

Methods


Inherited Variables

Inherited Methods

Class: QueryableLayer

QueryableLayer::__construct()
Constructor
QueryableLayer::addReturnedAttribute()
QueryableLayer::checkDbTableName()
Checks if db table name is set
QueryableLayer::checkDsn()
Checks if a dsn is set
QueryableLayer::checkId()
Checks if id is set
QueryableLayer::checkReturnedAttributes()
QueryableLayer::filterResults()
This is a hook to let child classes modify the LayerResult array
QueryableLayer::getAttributesList()
Returns a coma separated list of attributes
QueryableLayer::getCustomTemplate()
QueryableLayer::getDb()
QueryableLayer::getDsn()
Returns dsn
QueryableLayer::getId()
Gets id
QueryableLayer::getLabel()
Gets label
QueryableLayer::newLayerResult()
This method is to be redefined to use a custom (extended)
QueryableLayer::setCustomTemplate()
Sets the PEAR::DB object for queries
QueryableLayer::setDb()
Sets the PEAR::DB object for queries
QueryableLayer::setDbTableName()
Sets db table name
QueryableLayer::setDsn()
Sets dsn
QueryableLayer::setId()
Sets the id of the layer
QueryableLayer::setLabel()
Sets the label of the layer

Class Details

[line 227]
QueryableLayer classes for toolTips plugin Extensible classes to build a tooltip layer definition

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.




Tags:

copyright:  2005 Camptocamp SA
version:  $Id: QueryableLayer.php,v 1.1 2006/08/25 15:49:43 pgiraud Exp $


[ Top ]


Class Variables

$dbGeomColumnName =  'the_geom'

[line 245]

Name of the geometry column in database the table



Tags:

access:  protected

Type:   string


[ Top ]

$srid =  -1

[line 251]

PostGIS georef SRID value for the given table



Tags:

access:  protected

Type:   string


[ Top ]

$toleranceGeo =

[line 239]

Geographic tolerance for queries (geographic unit)



Tags:

access:  protected

Type:   float


[ Top ]

$tolerancePx =  0

[line 233]

Geographic tolerance for queries (geographic unit)



Tags:

access:  protected

Type:   float


[ Top ]



Class Methods


constructor __construct [line 253]

ByXyQueryableLayer __construct( )



Tags:

access:  public


Overrides QueryableLayer::__construct() (Constructor)

[ Top ]

method convertTolerance [line 272]

void convertTolerance( float $scale)

Sets the geographic tolerance from the set pixel tolerance using the

given scale




Tags:

access:  public


Parameters:

float   $scale   scale (in geo unit per pixel)

[ Top ]

method getXySqlQuery [line 312]

string getXySqlQuery( float $geoX, float $geoY, Dimension $dimension, Bbox $bbox)

This method is able to query attributes on a single table only; if you want to perform a more complex query, this method is to be redefined in a child class.



Tags:

return:  an SQL query
access:  protected


Parameters:

float   $geoX   geographic x coordinate for spatial condition
float   $geoY   geographic y coordinate for spatial condition
Dimension   $dimension   mainmap dimensions (width, height)
Bbox   $bbox   current mainmap extent

[ Top ]

method pointToBox3D [line 289]

box3D pointToBox3D( Dimension $x, x $y, y $width, Bbox $height, Bbox $bbox, [mixed $tolerance = 3])

converts a geographical point to a Box3D using tolerance



Tags:

access:  protected


Parameters:

Dimension   $x   image size
x   $y   geo coordinate
y   $width   geo coordinate
Bbox   $height   current bbox in geographical coordinates
tolerance   $bbox   tolerance given in pixel

[ Top ]

method queryLayerByXy [line 358]

array queryLayerByXy( QueryableLayer $geoX, float $geoY, Dimension $dimension, Bbox $bbox, Bbox 4)

Returns the attributes to be returned specified in the given

QueryableLayer




Tags:

return:  array of LayerResult
access:  public


Parameters:

Bbox   4   current mainmap extent
QueryableLayer   $geoX   layer to query
float   $geoY   geographic x coordinate for spatial condition
float   $dimension   geographic y coordinate for spatial condition
Dimension   $bbox   mainmap dimensions (width, height)

[ Top ]

method setDbGeomColumnName [line 276]

void setDbGeomColumnName( mixed $dbGeomColumnName)



Tags:

access:  public


[ Top ]

method setTolerancePx [line 259]

void setTolerancePx( int $tolerance)

Sets the geographic tolerance



Tags:

access:  public


Parameters:

int   $tolerance   tolerance in pixels

[ Top ]


Documentation generated on Wed, 30 Aug 2006 21:57:41 +0200 by phpDocumentor 1.3.0RC3