File: reference_type.xml

package info (click to toggle)
postgis 3.1.1%2Bdfsg-1%2Bdeb11u2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 83,792 kB
  • sloc: ansic: 151,982; sql: 146,734; xml: 51,051; sh: 6,186; cpp: 6,110; perl: 4,852; makefile: 3,002; python: 1,205; yacc: 447; lex: 133; javascript: 6
file content (233 lines) | stat: -rw-r--r-- 7,918 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?xml version="1.0" encoding="UTF-8"?>
  <sect1 id="PostGIS_Types">
    <sect1info>
    <abstract>
    <para>This section lists the custom PostgreSQL
		data types installed by PostGIS to represent spatial data.
    </para>
    <para>Each data type describes its type casting behaviour.
		A <ulink url="https://www.postgresql.org/docs/current/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS">type cast</ulink>
		converts values of one data type into another type.
		PostgreSQL allows defining casting behavior for custom types, along with the functions used to convert type values.
		Casts can have <emphasis role="bold">automatic</emphasis> behaviour,
		which allows automatic conversion of a function argument to a type supported by the function.</para>
		<para>
		Some casts have <emphasis role="bold">explicit</emphasis> behaviour,
		which means the cast must be specified using the syntax <varname>CAST(myval As sometype)</varname>
		or <varname>myval::sometype</varname>.
		Explicit casting avoids the issue of ambiguous casts,
		which can occur when using an overloaded function which does not support a given type.
		For example, a function may accept a box2d or a box3d, but not a geometry.
		Since geometry has an automatic cast to both box types, this produces an "ambiguous function" error.
	  To prevent the error use an explicit cast to the desired box type.</para>

    <para>All data types can be cast to <varname>text</varname>, so this does not need to be specified explicitly.</para>
    </abstract>
    </sect1info>
    <title>PostGIS Geometry/Geography/Box Data Types</title>

	<refentry id="box2d_type">
      <refnamediv>
        <refname>box2d</refname>
        <refpurpose>A 2-dimensional bounding box.
				Used to describe the 2D extent of a geometry or collection of geometries. </refpurpose>
      </refnamediv>

      <refsection>
        <title>Description</title>
        <para><varname>box2d</varname> is a spatial data type used to represent
				the two-dimensional enclosing box of a geometry or collection of geometries.
				For example, the <xref linkend="ST_Extent" /> aggregate function returns a <varname>box2d</varname> object.</para>
				<para>The representation contains the values <varname>xmin, ymin, xmax, ymax</varname>.
				These are the minimum and maxium values of the X and Y extents.
				</para>
      </refsection>

		<refsection>
			<title>See Also</title>
			<para><xref linkend="PostGIS_BoxFunctions" /></para>
		</refsection>
    </refentry>

	<refentry id="box3d_type">
      <refnamediv>
        <refname>box3d</refname>
        <refpurpose>A 3-dimensional bounding box.
				Used to describe the 3D extent of a geometry or collection of geometries. </refpurpose>
      </refnamediv>

      <refsection>
        <title>Description</title>
        <para><varname>box3d</varname> is a postgis spatial data type used to represent
				the three-dimensional enclosing box of a geometry or collection of geometries.
				For example, the <xref linkend="ST_3DExtent" /> aggregate function returns a <varname>box3d</varname> object.
				</para>
				<para>The representation contains the values <varname>xmin, ymin, zmin, xmax, ymax, zmax</varname>.
				These are the minimum and maxium values of the X, Y and Z extents.
				</para>
      </refsection>

      <refsection>
		<title>Casting Behavior</title>
		<para>This section lists the automatic as well as explicit casts allowed for this data type</para>
		<informaltable rowsep="1" frame="all">
		<tgroup cols="2">
			<tbody>
			  <row>
				<entry>Cast To</entry>
				<entry>Behavior</entry>
			  </row>
			  <row>
				<entry>box</entry>
				<entry>automatic</entry>
			  </row>
			  <row>
				<entry>box2d</entry>
				<entry>automatic</entry>
			  </row>
			  <row>
				<entry>geometry</entry>
				<entry>automatic</entry>
			  </row>
			</tbody>
		</tgroup>
		</informaltable>
		</refsection>

		<refsection>
			<title>See Also</title>
			<para><xref linkend="PostGIS_BoxFunctions" /></para>
		</refsection>

    </refentry>

	<refentry id="geometry">
		<refnamediv>
			<refname>geometry</refname>
			<refpurpose>The type representing spatial features with planar coordinate systems.</refpurpose>
		</refnamediv>

		<refsection>
			<title>Description</title>
			<para><varname>geometry</varname> is a fundamental PostGIS spatial data type used to represent a feature in planar (Euclidean) coordinate systems.</para>
			<para>All spatial operations on geometry use the units of the Spatial Reference System the geometry is in.</para>
		</refsection>

		<refsection>
		<title>Casting Behavior</title>
		<para>This section lists the automatic as well as explicit casts allowed for this data type</para>
		<informaltable rowsep="1" frame="all">
		<tgroup cols="2">
			<tbody>
			  <row>
				<entry>Cast To</entry>
				<entry>Behavior</entry>
			  </row>
			  <row>
				<entry>box</entry>
				<entry>automatic</entry>
			  </row>
			  <row>
				<entry>box2d</entry>
				<entry>automatic</entry>
			  </row>
			  <row>
				<entry>box3d</entry>
				<entry>automatic</entry>
			  </row>
			  <row>
				<entry>bytea</entry>
				<entry>automatic</entry>
			  </row>
			  <row>
				<entry>geography</entry>
				<entry>automatic</entry>
			  </row>
			  <row>
				<entry>text</entry>
				<entry>automatic</entry>
			  </row>
			</tbody>
		</tgroup>
		</informaltable>
		</refsection>

		<refsection>
			<title>See Also</title>
			<para><xref linkend="RefObject" />, <xref linkend="PostGIS_SQLMM_Functions" /></para>
		</refsection>
	</refentry>

	<refentry id="geometry_dump">
		<refnamediv>
			<refname>geometry_dump</refname>
			<refpurpose>A composite type used to describe the parts of complex geometry.</refpurpose>
		</refnamediv>

		<refsection>
		<title>Description</title>
		<para><varname>geometry_dump</varname> is a
		<ulink url="https://www.postgresql.org/docs/current/rowtypes.html">composite data type</ulink>
		containing the fields:</para>
		<itemizedlist>
		<listitem>
			<para><varname>geom</varname> - a references to a component geometry</para>
			</listitem>
		<listitem>
			<para><varname>path[]</varname> - a 1-dimensional integer array
			that defines the navigation path within the dumped geometry to the <varname>geom</varname> component.
			The path array starts at 1 (e.g. <varname>path[1]</varname> is the first element.)</para>
			</listitem>
		</itemizedlist>
		<para>
		It is used by the <varname>ST_Dump*</varname> family of functions as an output type to explode a complex geometry into its
		constituent parts.</para>
		</refsection>
		<refsection>
			<title>See Also</title>
			<para><xref linkend="PostGIS_Geometry_DumpFunctions" /> </para>
		</refsection>
	</refentry>

	<refentry id="geography">
		<refnamediv>
			<refname>geography</refname>
			<refpurpose>The type representing spatial features with geodetic (ellipsoidal) coordinate systems.</refpurpose>
		</refnamediv>

		<refsection>
		<title>Description</title>
		<para><varname>geography</varname> is a spatial data type used to represent a feature in geodetic coordinate systems.
		Geodetic coordinate systems model the earth using an ellipsoid.
		</para>
		<para>
		Spatial operations on the geography type provide more accurate results
		by taking the ellipsoidal model into account.
		</para>
		</refsection>

		<refsection>
		<title>Casting Behavior</title>
		<para>This section lists the automatic as well as explicit casts allowed for this data type</para>
		<informaltable rowsep="1" frame="all">
		<tgroup cols="2">
			<tbody>
			  <row>
				<entry>Cast To</entry>
				<entry>Behavior</entry>
			  </row>
			  <row>
				<entry>geometry</entry>
				<entry>explicit</entry>
			  </row>
			</tbody>
		</tgroup>
		</informaltable>
		</refsection>

		<refsection>
			<title>See Also</title>
			<para><xref linkend="PostGIS_Geography" />, <xref linkend="PostGIS_GeographyFunctions" /></para>
		</refsection>
	</refentry>
  </sect1>