source: trunk/docs/api/zoo-format-wkt.txt @ 272

Last change on this file since 272 was 272, checked in by nbozon, 13 years ago

add keywords with svn propset

  • Property svn:keywords set to HeadURL Date Author Id Rev
File size: 5.0 KB
RevLine 
[164]1.. _api-zoo-format-wkt:
2
3ZOO.Format.WKT
4==============
5
[192]6Class for reading and writing Well-Known Text.
[164]7
[192]8Inherits from
9
10- :ref:`ZOO.Format <api-zoo-format>`
11
[164]12Functions and Properties       
13------------------------
14
15.. list-table::
16   :widths: 30 50
17   :header-rows: 1
18
19   * - NAME
20     - DESCRIPTION
21   * - :ref:`ZOO.Format.WKT <ZOO.Format.WKT>`
22     - Create a new parser for WKT
23   * - :ref:`read <read>`
24     - Deserialize a WKT string and return a vector feature or an array of vector features.
25   * - :ref:`write <write>`
26     - Serialize a feature or array of features into a WKT string.
27   * - :ref:`extract <extract>`
28     - Object with properties corresponding to the geometry types.   
29   * - :ref:`parse <parse>`
30     - Object with properties corresponding to the geometry types.
31   * - :ref:`parse.point <parse.point>`
32     - Return point feature given a point WKT fragment.   
33   * - :ref:`parse.multipoint <parse.multipoint>`
34     - Return a multipoint feature given a multipoint WKT fragment.
35   * - :ref:`parse.linestring <parse.linestring>`
36     - Return a linestring feature given a linestring WKT fragment.
37   * - :ref:`parse.multilinestring <parse.multilinestring>`
38     - Return a multilinestring feature given a multilinestring WKT fragment.
39   * - :ref:`parse.polygon <parse.polygon>`
40     - Return a polygon feature given a polygon WKT fragment.
41   * - :ref:`parse.multipolygon <parse.multipolygon>`
42     - Return a multipolygon feature given a multipolygon WKT fragment.
43   * - :ref:`parse.geometrycollection <parse.geometrycollection>`
44     - Return an array of features given a geometrycollection WKT fragment.     
45       
46.. _ZOO.Format.WKT:   
47
48ZOO.Format.WKT 
49  Create a new parser for WKT
[176]50
51  *Parameters*
[164]52 
[176]53  ``options {Object}`` An optional object whose properties will be set on this instance
54
55  *Returns*
56
57  :ref:`{ZOO.Format.WKT} <api-zoo-format-wkt>` A new WKT parser.
58 
[164]59.. _read:     
60 
61read   
[176]62  ::
[164]63 
[176]64    read: function(wkt)
65
66  Deserialize a WKT string and return a vector feature or an array of vector features. 
67  Supports WKT for POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON,
68  and GEOMETRYCOLLECTION.
69 
70  *Parameters*
71 
72  ``wkt {String}`` A WKT string
73 
74  *Returns*
75
76  {<ZOO.Feature.Vector>|Array} A feature or array of features for GEOMETRYCOLLECTION WKT.
77 
[164]78.. _write:       
79 
80write   
[176]81  ::
82 
83    write: function(features)
84
[164]85  Serialize a feature or array of features into a WKT string.
86 
[176]87  *Parameters*
88 
89  ``features {<ZOO.Feature.Vector>|Array}`` A feature or array of features
90
91  *Returns*
92
93  ``{String}`` The WKT string representation of the input geometries
94 
[164]95.. _extract:         
96 
97extract
[176]98  Object with properties corresponding to the geometry types. Property values are
99  functions that do the actual data extraction.
[164]100 
101.. _parse:           
102 
103parse   
[176]104  Object with properties corresponding to the geometry types. Property values are
105  functions that do the actual parsing.
[164]106 
107.. _parse.point:             
108 
109parse.point     
110  Return point feature given a point WKT fragment.
111 
[176]112  *Parameters*
113 
114  ``str {String}`` A WKT fragment representing the point
115 
116  *Returns*
117 
118  :ref:`{ZOO.Feature} <api-zoo-feature>` A point feature 
119 
[164]120.. _parse.multipoint:               
121 
122parse.multipoint       
123  Return a multipoint feature given a multipoint WKT fragment.
[176]124
125  *Parameters*
126 
127  ``str {String}`` A WKT fragment representing the multipoint
128
129  *Returns*
130
131  :ref:`{ZOO.Feature} <api-zoo-feature>` A multipoint feature
132 
[164]133.. _parse.linestring:               
134 
135parse.linestring       
136  Return a linestring feature given a linestring WKT fragment.
[176]137
138  *Parameters*
[164]139 
[176]140  ``str {String}`` A WKT fragment representing the linestring
141
142  *Returns*
143
144  :ref:`{ZOO.Feature} <api-zoo-feature>` A linestring feature
145 
[164]146.. _parse.multilinestring:                 
147 
148parse.multilinestring   
149  Return a multilinestring feature given a multilinestring WKT fragment.
150 
[176]151  *Parameters*
152 
153  ``str {String}`` A WKT fragment representing the multilinestring
154 
155  *Returns*
156
157  :ref:`{ZOO.Feature} <api-zoo-feature>` A multilinestring feature 
158 
[164]159.. _parse.polygon:                 
160 
161parse.polygon   
162  Return a polygon feature given a polygon WKT fragment.
[176]163
164  *Parameters*
[164]165 
[176]166  ``str {String}`` A WKT fragment representing the polygon
167 
168  *Returns*
169
170  :ref:`{ZOO.Feature} <api-zoo-feature>` A polygon feature
171 
[164]172.. _parse.multipolygon:                   
173 
174parse.multipolygon     
175  Return a multipolygon feature given a multipolygon WKT fragment.
[176]176
177  *Parameters*
[164]178 
[176]179  ``str {String}`` A WKT fragment representing the multipolygon
180
181  *Returns*
182
183  :ref:`{ZOO.Feature} <api-zoo-feature>` A multipolygon feature 
184 
[164]185.. _parse.geometrycollection:                     
186 
187parse.geometrycollection       
188  Return an array of features given a geometrycollection WKT fragment.
189
[176]190  *Parameters*
191 
192  ``str {String}`` A WKT fragment representing the geometrycollection
193
194  *Returns*
195
196  ``{Array}`` An array of ZOO.Feature
Note: See TracBrowser for help on using the repository browser.

Search

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