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

Last change on this file since 400 was 348, checked in by neteler, 13 years ago

set correctly svn propset

  • Property svn:eol-style set to native
  • Property svn:keywords set to HeadURL Date Author Id Rev
  • Property svn:mime-type set to text/plain
File size: 4.9 KB
Line 
1.. _api-zoo-format-wkt:
2
3ZOO.Format.WKT
4==============
5
6Class for reading and writing Well-Known Text.
7
8Inherits from
9
10- :ref:`ZOO.Format <api-zoo-format>`
11
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
50
51  *Parameters*
52 
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 
59.. _read:     
60 
61read   
62  ::
63 
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 
78.. _write:       
79 
80write   
81  ::
82 
83    write: function(features)
84
85  Serialize a feature or array of features into a WKT string.
86 
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 
95.. _extract:         
96 
97extract
98  Object with properties corresponding to the geometry types. Property values are
99  functions that do the actual data extraction.
100 
101.. _parse:           
102 
103parse   
104  Object with properties corresponding to the geometry types. Property values are
105  functions that do the actual parsing.
106 
107.. _parse.point:             
108 
109parse.point     
110  Return point feature given a point WKT fragment.
111 
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 
120.. _parse.multipoint:               
121 
122parse.multipoint       
123  Return a multipoint feature given a multipoint WKT fragment.
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 
133.. _parse.linestring:               
134 
135parse.linestring       
136  Return a linestring feature given a linestring WKT fragment.
137
138  *Parameters*
139 
140  ``str {String}`` A WKT fragment representing the linestring
141
142  *Returns*
143
144  :ref:`{ZOO.Feature} <api-zoo-feature>` A linestring feature
145 
146.. _parse.multilinestring:                 
147 
148parse.multilinestring   
149  Return a multilinestring feature given a multilinestring WKT fragment.
150 
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 
159.. _parse.polygon:                 
160 
161parse.polygon   
162  Return a polygon feature given a polygon WKT fragment.
163
164  *Parameters*
165 
166  ``str {String}`` A WKT fragment representing the polygon
167 
168  *Returns*
169
170  :ref:`{ZOO.Feature} <api-zoo-feature>` A polygon feature
171 
172.. _parse.multipolygon:                   
173 
174parse.multipolygon     
175  Return a multipolygon feature given a multipolygon WKT fragment.
176
177  *Parameters*
178 
179  ``str {String}`` A WKT fragment representing the multipolygon
180
181  *Returns*
182
183  :ref:`{ZOO.Feature} <api-zoo-feature>` A multipolygon feature 
184 
185.. _parse.geometrycollection:                     
186 
187parse.geometrycollection       
188  Return an array of features given a geometrycollection WKT fragment.
189
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

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