source: trunk/docs/api/zoo-geometry.txt @ 230

Last change on this file since 230 was 187, checked in by jmckenna, 14 years ago

add ZOO.Geometry doc

File size: 3.7 KB
Line 
1.. _api-zoo-geometry:
2
3ZOO.Geometry
4============
5
6A Geometry is a description of a geographic object.
7
8Properties     
9----------
10
11.. list-table::
12   :widths: 12 50
13   :header-rows: 1
14
15   * - NAME
16     - DESCRIPTION
17   * - :ref:`id <id>`
18     - {String} A unique identifier for this geometry.
19   * - :ref:`parent <parent>`
20     - {ZOO.Geometry}This is set when a Geometry is added as component of another geometry
21   * - :ref:`bounds <bounds>`
22     - {ZOO.Bounds} The bounds of this geometry
23
24Functions       
25---------
26
27.. list-table::
28   :widths: 15 50
29   :header-rows: 1
30
31   * - NAME
32     - DESCRIPTION
33   * - :ref:`ZOO.Geometry <ZOO.Geometry>`
34     - Creates a geometry object.
35   * - :ref:`destroy <destroy>`
36     - nullify references to prevent circular references and memory leaks
37   * - :ref:`clone <clone>`
38     - Create a clone of this vector feature.
39   * - :ref:`extendBounds <extendBounds>`
40     - Moves the feature and redraws it at its new location
41   * - :ref:`clearBounds <clearBounds>`
42     - Nullify this components bounds and that of its parent as well.
43   * - :ref:`getBounds <getBounds>`
44     - Get the bounds for this Geometry.
45   * - :ref:`calculateBounds <calculateBounds>`
46     - Recalculate the bounds for the geometry.
47   * - :ref:`toString <toString>`
48     - Returns the Well-Known Text representation of a geometry
49   * - :ref:`ZOO.Geometry.fromWKT <ZOO.Geometry.fromWKT>`
50     - Generate a geometry given a Well-Known Text string.   
51   
52     
53**Properties**
54       
55.. _id:
56
57id     
58  ``{String}`` A unique identifier for this geometry.
59 
60.. _parent: 
61 
62parent 
63  :ref:`{ZOO.Geometry} <api-zoo-geometry>` This is set when a Geometry is added as component of another geometry
64 
65.. _bounds:   
66 
67bounds 
68  :ref:`{ZOO.Bounds} <api-zoo-bounds>` The bounds of this geometry
69
70**Functions**
71       
72.. _ZOO.Geometry:
73
74ZOO.Geometry   
75  Creates a geometry object.
76 
77.. _destroy:   
78 
79destroy
80  ::
81 
82    destroy: function()
83
84  Destroy this geometry.
85 
86.. _clone:     
87 
88clone   
89  ::
90 
91    clone: function()
92
93  Create a clone of this geometry.  Does not set any non-standard properties of the cloned geometry.
94 
95  *Returns*
96
97  :ref:`{ZOO.Geometry} <api-zoo-geometry>` An exact clone of this geometry. 
98 
99.. _extendBounds:       
100 
101extendBounds   
102  ::
103 
104    extendBounds: function(newBounds)
105
106  Extend the existing bounds to include the new bounds.  If geometry's bounds is not yet set,
107  then set a new Bounds.
108 
109  *Parameters*
110 
111  ``newBounds`` :ref:`{ZOO.Bounds} <api-zoo-bounds>`
112 
113.. _clearBounds:         
114 
115clearBounds     
116  ::
117 
118    clearBounds: function()
119
120  Nullify this components bounds and that of its parent as well.
121 
122.. _getBounds:           
123 
124getBounds       
125  ::
126 
127    getBounds: function()
128
129  Get the bounds for this Geometry.  If bounds is not set, it is calculated again, this
130  makes queries faster.
131 
132  *Returns*
133
134  ``newBounds`` :ref:`{ZOO.Bounds} <api-zoo-bounds>`
135 
136.. _calculateBounds:             
137 
138calculateBounds
139  ::
140 
141    calculateBounds: function()
142
143  Recalculate the bounds for the geometry.
144 
145.. _toString:               
146 
147toString       
148  ::
149 
150    toString: function()
151
152  Returns the Well-Known Text representation of a geometry
153 
154  *Returns*
155
156  ``{String}`` Well-Known Text 
157 
158.. _ZOO.Geometry.fromWKT:                 
159 
160ZOO.Geometry.fromWKT   
161  ::
162 
163    ZOO.Geometry.fromWKT = function(wkt)
164
165  Generate a geometry given a Well-Known Text string.
166 
167  *Parameters*
168 
169  ``wkt {String}`` A string representing the geometry in Well-Known Text.
170
171  *Returns*
172
173  :ref:`{ZOO.Geometry} <api-zoo-geometry>` A geometry of the appropriate class.
Note: See TracBrowser for help on using the repository browser.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png