File: reference_bbox.xml

package info (click to toggle)
postgis 3.5.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 70,052 kB
  • sloc: ansic: 162,204; sql: 93,950; xml: 53,121; cpp: 12,646; perl: 5,658; sh: 5,369; makefile: 3,434; python: 1,205; yacc: 447; lex: 151; pascal: 58
file content (998 lines) | stat: -rw-r--r-- 31,542 bytes parent folder | download | duplicates (4)
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
<!-- Converted by db4-upgrade version 1.1 -->
<section xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="BBox_Functions">
	  <title>Bounding Box Functions</title><info>
	    <abstract>
			<para>These functions produce or operate on bounding boxes.
			They can also provide and accept geometry values, by using automatic or explicit casts.
			</para>
			<para>See also <xref linkend="PostGIS_BoxFunctions"/>.</para>
    	</abstract>
    </info>



	<refentry xml:id="Box2D">
	  <refnamediv>
		<refname>Box2D</refname>

		<refpurpose>Returns a BOX2D representing the 2D extent of a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>box2d <function>Box2D</function></funcdef>
			<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns a <xref linkend="box2d_type"/> representing the 2D extent of the geometry.</para>

		<para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
		<para>&curve_support;</para>
		<para>&P_support;</para>
		<para>&T_support;</para>
	  </refsection>

	  <refsection>
		<title>Examples</title>

<programlisting>SELECT Box2D(ST_GeomFromText('LINESTRING(1 2, 3 4, 5 6)'));

box2d
---------
BOX(1 2,5 6)
</programlisting>
<programlisting>
SELECT Box2D(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)'));

box2d
--------
BOX(220186.984375 150406,220288.25 150506.140625)
</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="Box3D"/>, <xref linkend="ST_GeomFromText"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="Box3D">
	  <refnamediv>
		<refname>Box3D</refname>

		<refpurpose>Returns a BOX3D representing the 3D extent of a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>box3d <function>Box3D</function></funcdef>
			<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns a <xref linkend="box3d_type"/> representing the 3D extent of the geometry.</para>
		<para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
		<para>&curve_support;</para>
		<para>&P_support;</para>
		<para>&T_support;</para>
		<para>&Z_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

<programlisting>SELECT Box3D(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 5, 5 6 5)'));

Box3d
---------
BOX3D(1 2 3,5 6 5)
</programlisting>
<programlisting>
SELECT Box3D(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 1,220227 150406 1)'));

Box3d
--------
BOX3D(220227 150406 1,220268 150415 1)
</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="Box2D"/>, <xref linkend="ST_GeomFromEWKT"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_EstimatedExtent">
	  <refnamediv>
		<refname>ST_EstimatedExtent</refname>

		<refpurpose>Returns the estimated extent of a spatial table.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
			<paramdef><type>text </type> <parameter>schema_name</parameter></paramdef>
			<paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
			<paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
			<paramdef><type>boolean </type> <parameter>parent_only</parameter></paramdef>
		  </funcprototype>


		  <funcprototype>
			<funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
			<paramdef><type>text </type> <parameter>schema_name</parameter></paramdef>
			<paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
			<paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
		  </funcprototype>

		  <funcprototype>
			<funcdef>box2d <function>ST_EstimatedExtent</function></funcdef>
			<paramdef><type>text </type> <parameter>table_name</parameter></paramdef>
			<paramdef><type>text </type> <parameter>geocolumn_name</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns the estimated extent of a spatial table as a <xref linkend="box2d_type"/>.
            The	current schema is used if not specified.
			The estimated extent is taken from the geometry column's statistics.
            This is usually much faster than computing the exact extent of the table
            using <xref linkend="ST_Extent"/> or <xref linkend="ST_3DExtent"/>.
            </para>
        <para>
            The default behavior is to also use statistics collected from child tables (tables
			with INHERITS) if available. If <varname>parent_only</varname> is set to TRUE, only
			statistics for the given table are used and child tables are ignored.
		</para>

		<para>For PostgreSQL &gt;= 8.0.0 statistics are gathered by VACUUM
		ANALYZE and the result extent will be about 95% of the actual one.
        For PostgreSQL &lt; 8.0.0 statistics are gathered by running
		<code>update_geometry_stats()</code> and the result extent is exact.
        </para>

        <note>
            <para>
            In the absence of statistics (empty table or no ANALYZE called) this function
            returns NULL.  Prior to version 1.5.4 an exception was thrown instead.
		    </para>
        </note>

        <note>
            <para>
            Escaping names for tables and/or namespaces that include special characters and quotes may require special handling. A user notes: "For schemas and tables, use identifier escaping rules to produce a double-quoted string, and afterwards remove the first and last double-quote character. For geometry column pass as is."
            </para>
        </note>

    <para role="availability" conformance="1.0.0">Availability: 1.0.0</para>
    <para role="changed" conformance="2.1.0.">Changed: 2.1.0. Up to 2.0.x this was called ST_Estimated_Extent.</para>

		<para>&curve_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>SELECT ST_EstimatedExtent('ny', 'edges', 'geom');
--result--
BOX(-8877653 4912316,-8010225.5 5589284)

SELECT ST_EstimatedExtent('feature_poly', 'geom');
--result--
BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332)
		</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_Extent"/>, <xref linkend="ST_3DExtent"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_Expand">
	  <refnamediv>
		<refname>ST_Expand</refname>
		<refpurpose>Returns a bounding box expanded from another bounding box or a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>geometry <function>ST_Expand</function></funcdef>
			<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
			<paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
		  </funcprototype>

		  <funcprototype>
			<funcdef>geometry <function>ST_Expand</function></funcdef>
			<paramdef><type>geometry </type> <parameter>geom</parameter></paramdef>
			<paramdef><type>float</type> <parameter>dx</parameter></paramdef>
			<paramdef><type>float</type> <parameter>dy</parameter></paramdef>
			<paramdef choice="opt"><type>float</type> <parameter>dz=0</parameter></paramdef>
			<paramdef choice="opt"><type>float</type> <parameter>dm=0</parameter></paramdef>
		  </funcprototype>

		  <funcprototype>
			<funcdef>box2d <function>ST_Expand</function></funcdef>
			<paramdef><type>box2d </type> <parameter>box</parameter></paramdef>
			<paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
		  </funcprototype>

		  <funcprototype>
			<funcdef>box2d <function>ST_Expand</function></funcdef>
			<paramdef><type>box2d </type> <parameter>box</parameter></paramdef>
			<paramdef><type>float</type> <parameter>dx</parameter></paramdef>
			<paramdef><type>float</type> <parameter>dy</parameter></paramdef>
		  </funcprototype>

		  <funcprototype>
			<funcdef>box3d <function>ST_Expand</function></funcdef>
			<paramdef><type>box3d </type> <parameter>box</parameter></paramdef>
			<paramdef><type>float</type> <parameter>units_to_expand</parameter></paramdef>
		  </funcprototype>

		  <funcprototype>
			<funcdef>box3d <function>ST_Expand</function></funcdef>
			<paramdef><type>box3d </type> <parameter>box</parameter></paramdef>
			<paramdef><type>float</type>  <parameter>dx</parameter></paramdef>
			<paramdef><type>float</type>  <parameter>dy</parameter></paramdef>
			<paramdef choice="opt"><type>float</type>  <parameter>dz=0</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns a bounding box expanded from the bounding box of the input,
			either by specifying a single distance with which the box should be expanded on both
			axes, or by specifying an expansion distance for each axis.

			Uses double-precision. Can be used for distance queries, or to add a bounding box
			filter to a query to take advantage of a spatial index.</para>

		<para>In addition to the version of ST_Expand accepting and returning a geometry, variants
			are provided that accept and return
            <xref linkend="box2d_type"/> and <xref linkend="box3d_type"/> data types.
		</para>

		<para>Distances are in the units of the spatial reference system of the input.</para>

		<para>ST_Expand is similar to <xref linkend="ST_Buffer"/>,
			except while buffering expands a geometry in all directions,
			ST_Expand expands the bounding box along each axis.</para>

		<note>
		  <para>Pre version 1.3, ST_Expand was used in conjunction with <xref linkend="ST_Distance"/> to do indexable distance queries.  For example,
			<code>geom &amp;&amp; ST_Expand('POINT(10 20)', 10) AND ST_Distance(geom, 'POINT(10 20)') &lt; 10</code>.
			This has been replaced by the simpler and more efficient <xref linkend="ST_DWithin"/> function.</para>
		</note>

        <para role="availability" conformance="1.5.0">Availability: 1.5.0 behavior changed to output double precision instead of float4 coordinates.</para>
        <para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
        <para role="enhanced" conformance="2.3.0">Enhanced: 2.3.0 support was added to expand a box by different amounts in different dimensions.</para>

		<para>&P_support;</para>
		<para>&T_support;</para>

	  </refsection>

	  <refsection>
		<title>Examples</title>
		<note><para>Examples below use US National Atlas Equal Area (SRID=2163) which is a meter projection</para></note>
		<programlisting>
		<!-- TODO: fix results of documentation to reflect new behavior -->
--10 meter expanded box around bbox of a linestring
SELECT CAST(ST_Expand(ST_GeomFromText('LINESTRING(2312980 110676,2312923 110701,2312892 110714)', 2163),10) As box2d);
					 st_expand
------------------------------------
 BOX(2312882 110666,2312990 110724)

--10 meter expanded 3D box of a 3D box
SELECT ST_Expand(CAST('BOX3D(778783 2951741 1,794875 2970042.61545891 10)' As box3d),10)
							  st_expand
-----------------------------------------------------
 BOX3D(778773 2951731 -9,794885 2970052.61545891 20)

 --10 meter geometry astext rep of a expand box around a point geometry
 SELECT ST_AsEWKT(ST_Expand(ST_GeomFromEWKT('SRID=2163;POINT(2312980 110676)'),10));
											st_asewkt
-------------------------------------------------------------------------------------------------
 SRID=2163;POLYGON((2312970 110666,2312970 110686,2312990 110686,2312990 110666,2312970 110666))

		</programlisting>
	  </refsection>

	  <refsection>
		<title>See Also</title>
		<para><xref linkend="ST_Buffer"/>, <xref linkend="ST_DWithin"/>, <xref linkend="ST_SRID"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_Extent">
	  <refnamediv>
		<refname>ST_Extent</refname>
		<refpurpose>Aggregate function that returns the bounding box of geometries.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>box2d <function>ST_Extent</function></funcdef>
			<paramdef><type>geometry set</type> <parameter>geomfield</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>An aggregate function that returns a <xref linkend="box2d_type"/> bounding box
        that bounds a set of geometries.
        </para>

		<para>The bounding box coordinates are in the spatial reference system of the input geometries.</para>

		<para>ST_Extent is similar in concept to Oracle Spatial/Locator's SDO_AGGR_MBR.</para>

		<note>
		  <para>ST_Extent returns boxes with only X and Y ordinates even with 3D geometries.
          To return XYZ ordinates use <xref linkend="ST_3DExtent"/>.</para>
		</note>

		<note>
		  <para>The returned <code>box3d</code> value does not include a SRID.
            Use <xref linkend="ST_SetSRID"/> to convert it into a geometry with SRID metadata.
            The SRID is the same as the input geometries.</para>
		</note>

		<para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
		<para>&P_support;</para>
		<para>&T_support;</para>

	  </refsection>

	  <refsection>
		<title>Examples</title>
		<note><para>Examples below use Massachusetts State Plane ft (SRID=2249)</para></note>
		<programlisting>

SELECT ST_Extent(geom) as bextent FROM sometable;
					 st_bextent
------------------------------------
BOX(739651.875 2908247.25,794875.8125 2970042.75)


--Return extent of each category of geometries
SELECT ST_Extent(geom) as bextent
FROM sometable
GROUP BY category ORDER BY category;

					  bextent                       |         name
----------------------------------------------------+----------------
 BOX(778783.5625 2951741.25,794875.8125 2970042.75) | A
 BOX(751315.8125 2919164.75,765202.6875 2935417.25) | B
 BOX(739651.875 2917394.75,756688.375 2935866)      | C

 --Force back into a geometry
 -- and render the extended text representation of that geometry
SELECT ST_SetSRID(ST_Extent(geom),2249) as bextent FROM sometable;

				bextent
--------------------------------------------------------------------------------
 SRID=2249;POLYGON((739651.875 2908247.25,739651.875 2970042.75,794875.8125 2970042.75,
 794875.8125 2908247.25,739651.875 2908247.25))
		</programlisting>
	  </refsection>

	  <refsection>
		<title>See Also</title>
		<para>
            <xref linkend="ST_EstimatedExtent"/>,
            <xref linkend="ST_3DExtent"/>,
            <xref linkend="ST_SetSRID"/>
		</para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_3DExtent">
	  <refnamediv>
		<refname>ST_3DExtent</refname>
		<refpurpose>Aggregate function that returns the 3D bounding box of geometries.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>box3d <function>ST_3DExtent</function></funcdef>
			<paramdef><type>geometry set</type> <parameter>geomfield</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>An aggregate function that returns a <xref linkend="box3d_type"/> (includes Z ordinate) bounding box
        that bounds a set of geometries.
        </para>
		<para>The bounding box coordinates are in the spatial reference system of the input geometries.</para>

		<note>
		  <para>The returned <code>box3d</code> value does not include a SRID.
            Use <xref linkend="ST_SetSRID"/> to convert it into a geometry with SRID metadata.
            The SRID is the same as the input geometries.</para>
		</note>

		<para role="enhanced" conformance="2.0.0">Enhanced: 2.0.0 support for Polyhedral surfaces, Triangles and TIN was introduced.</para>
		<para role="changed" conformance="2.0.0">Changed: 2.0.0 In prior versions this used to be called ST_Extent3D</para>
		<para>&Z_support;</para>
		<para>&curve_support;</para>
		<para>&P_support;</para>
		<para>&T_support;</para>
	  </refsection>

	  <refsection>
		<title>Examples</title>
		<programlisting>
SELECT ST_3DExtent(foo.geom) As b3extent
FROM (SELECT ST_MakePoint(x,y,z) As geom
	FROM generate_series(1,3) As x
		CROSS JOIN generate_series(1,2) As y
		CROSS JOIN generate_series(0,2) As Z) As foo;
	  b3extent
--------------------
 BOX3D(1 1 0,3 2 2)

--Get the extent of various elevated circular strings
SELECT ST_3DExtent(foo.geom) As b3extent
FROM (SELECT ST_Translate(ST_Force_3DZ(ST_LineToCurve(ST_Buffer(ST_Point(x,y),1))),0,0,z) As geom
	FROM generate_series(1,3) As x
		CROSS JOIN generate_series(1,2) As y
		CROSS JOIN generate_series(0,2) As Z) As foo;

	b3extent
--------------------
 BOX3D(1 0 0,4 2 2)
		</programlisting>
	  </refsection>

	  <refsection>
		<title>See Also</title>
		<para><xref linkend="ST_Extent"/>, <xref linkend="ST_Force_3DZ"/>, <xref linkend="ST_SetSRID"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_MakeBox2D">
	  <refnamediv>
		<refname>ST_MakeBox2D</refname>

		<refpurpose>Creates a BOX2D defined by two 2D point geometries.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>box2d <function>ST_MakeBox2D</function></funcdef>
			<paramdef><type>geometry </type> <parameter>pointLowLeft</parameter></paramdef>
			<paramdef><type>geometry </type> <parameter>pointUpRight</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Creates a <xref linkend="box2d_type"/> defined by two Point
			geometries.  This is useful for doing range queries.</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting><![CDATA[

--Return all features that fall reside or partly reside in a US national atlas coordinate bounding box
--It is assumed here that the geometries are stored with SRID = 2163 (US National atlas equal area)
SELECT feature_id, feature_name, geom
FROM features
WHERE geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-989502.1875, 528439.5625),
	ST_Point(-987121.375 ,529933.1875)),2163)
]]></programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_Point"/>, <xref linkend="ST_SetSRID"/>, <xref linkend="ST_SRID"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_3DMakeBox">
	  <refnamediv>
		<refname>ST_3DMakeBox</refname>

		<refpurpose>Creates a BOX3D defined by two 3D point	geometries.</refpurpose>
	  </refnamediv>
	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>box3d <function>ST_3DMakeBox</function></funcdef>
			<paramdef><type>geometry </type> <parameter>point3DLowLeftBottom</parameter></paramdef>
			<paramdef><type>geometry </type> <parameter>point3DUpRightTop</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Creates a <xref linkend="box3d_type"/> defined by two 3D Point
			geometries. </para>

		<!-- Optionally mention 3D support -->
		<para><inlinemediaobject>
			<imageobject>
			  <imagedata fileref="images/check.png"/>
			</imageobject>
		  </inlinemediaobject> This function supports 3D and will not drop the z-index.</para>
		 <para role="changed" conformance="2.0.0">Changed: 2.0.0 In prior versions this used to be called ST_MakeBox3D</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>
SELECT ST_3DMakeBox(ST_MakePoint(-989502.1875, 528439.5625, 10),
	ST_MakePoint(-987121.375 ,529933.1875, 10)) As abb3d

--bb3d--
--------
BOX3D(-989502.1875 528439.5625 10,-987121.375 529933.1875 10)
	</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_MakePoint"/>, <xref linkend="ST_SetSRID"/>, <xref linkend="ST_SRID"/></para>
	  </refsection>
	</refentry>

		<refentry xml:id="ST_XMax">
	  <refnamediv>
		<refname>ST_XMax</refname>

		<refpurpose>Returns the X maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>float <function>ST_XMax</function></funcdef>
			<paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns the X maxima of a 2D or 3D bounding box or a geometry.</para>

		<note>
		  <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
			However, it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
		</note>

		<para>&Z_support;</para>
		<para>&curve_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>SELECT ST_XMax('BOX3D(1 2 3, 4 5 6)');
st_xmax
-------
4

SELECT ST_XMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
st_xmax
-------
5

SELECT ST_XMax(CAST('BOX(-3 2, 3 4)' As box2d));
st_xmax
-------
3
--Observe THIS DOES NOT WORK because it will try to auto-cast the string representation to a BOX3D
SELECT ST_XMax('LINESTRING(1 3, 5 6)');

--ERROR:  BOX3D parser - doesn't start with BOX3D(

SELECT ST_XMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
st_xmax
--------
220288.248780547
		</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_XMin"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_XMin">
	  <refnamediv>
		<refname>ST_XMin</refname>

		<refpurpose>Returns the X minima of a 2D or 3D bounding box or a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>float <function>ST_XMin</function></funcdef>
			<paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns the X minima of a 2D or 3D bounding box or a geometry.</para>

		<note>
		  <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
			However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
		</note>

		<para>&Z_support;</para>
		<para>&curve_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>SELECT ST_XMin('BOX3D(1 2 3, 4 5 6)');
st_xmin
-------
1

SELECT ST_XMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
st_xmin
-------
1

SELECT ST_XMin(CAST('BOX(-3 2, 3 4)' As box2d));
st_xmin
-------
-3
--Observe THIS DOES NOT WORK because it will try to auto-cast the string representation to a BOX3D
SELECT ST_XMin('LINESTRING(1 3, 5 6)');

--ERROR:  BOX3D parser - doesn't start with BOX3D(

SELECT ST_XMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
st_xmin
--------
220186.995121892
		</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_YMax">
	  <refnamediv>
		<refname>ST_YMax</refname>

		<refpurpose>Returns the Y maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>float <function>ST_YMax</function></funcdef>
			<paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns the Y maxima of a 2D or 3D bounding box or a geometry.</para>

		<note>
		  <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
			However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
		</note>

		<para>&Z_support;</para>
		<para>&curve_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>SELECT ST_YMax('BOX3D(1 2 3, 4 5 6)');
st_ymax
-------
5

SELECT ST_YMax(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
st_ymax
-------
6

SELECT ST_YMax(CAST('BOX(-3 2, 3 4)' As box2d));
st_ymax
-------
4
--Observe THIS DOES NOT WORK because it will try to auto-cast the string representation to a BOX3D
SELECT ST_YMax('LINESTRING(1 3, 5 6)');

--ERROR:  BOX3D parser - doesn't start with BOX3D(

SELECT ST_YMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
st_ymax
--------
150506.126829327
		</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_YMin">
	  <refnamediv>
		<refname>ST_YMin</refname>

		<refpurpose>Returns the Y minima of a 2D or 3D bounding box or a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>float <function>ST_YMin</function></funcdef>
			<paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns the Y minima of a 2D or 3D bounding box or a geometry.</para>

		<note>
		  <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
			However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
		</note>

		<para>&Z_support;</para>
		<para>&curve_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>SELECT ST_YMin('BOX3D(1 2 3, 4 5 6)');
st_ymin
-------
2

SELECT ST_YMin(ST_GeomFromText('LINESTRING(1 3 4, 5 6 7)'));
st_ymin
-------
3

SELECT ST_YMin(CAST('BOX(-3 2, 3 4)' As box2d));
st_ymin
-------
2
--Observe THIS DOES NOT WORK because it will try to auto-cast the string representation to a BOX3D
SELECT ST_YMin('LINESTRING(1 3, 5 6)');

--ERROR:  BOX3D parser - doesn't start with BOX3D(

SELECT ST_YMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
st_ymin
--------
150406
		</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_ZMax"/>, <xref linkend="ST_ZMin"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_ZMax">
	  <refnamediv>
		<refname>ST_ZMax</refname>

		<refpurpose>Returns the Z maxima of a 2D or 3D bounding box or a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>float <function>ST_ZMax</function></funcdef>
			<paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns the Z maxima of a 2D or 3D bounding box or a geometry.</para>

		<note>
		  <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
			However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
		</note>

		<para>&Z_support;</para>
		<para>&curve_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>SELECT ST_ZMax('BOX3D(1 2 3, 4 5 6)');
st_zmax
-------
6

SELECT ST_ZMax(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)'));
st_zmax
-------
7

SELECT ST_ZMax('BOX3D(-3 2 1, 3 4 1)' );
st_zmax
-------
1
--Observe THIS DOES NOT WORK because it will try to auto-cast the string representation to a BOX3D
SELECT ST_ZMax('LINESTRING(1 3 4, 5 6 7)');

--ERROR:  BOX3D parser - doesn't start with BOX3D(

SELECT ST_ZMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
st_zmax
--------
3
		</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/></para>
	  </refsection>
	</refentry>

	<refentry xml:id="ST_ZMin">
	  <refnamediv>
		<refname>ST_ZMin</refname>

		<refpurpose>Returns the Z minima of a 2D or 3D bounding box or a geometry.</refpurpose>
	  </refnamediv>

	  <refsynopsisdiv>
		<funcsynopsis>
		  <funcprototype>
			<funcdef>float <function>ST_ZMin</function></funcdef>
			<paramdef><type>box3d </type> <parameter>aGeomorBox2DorBox3D</parameter></paramdef>
		  </funcprototype>
		</funcsynopsis>
	  </refsynopsisdiv>

	  <refsection>
		<title>Description</title>

		<para>Returns the Z minima of a 2D or 3D bounding box or a geometry.</para>

		<note>
		  <para>Although this function is only defined for box3d, it also works for box2d and geometry values due to automatic casting.
			However it will not accept a geometry or box2d text representation, since those do not auto-cast.</para>
		</note>

		<para>&Z_support;</para>
		<para>&curve_support;</para>
	  </refsection>


	  <refsection>
		<title>Examples</title>

		<programlisting>SELECT ST_ZMin('BOX3D(1 2 3, 4 5 6)');
st_zmin
-------
3

SELECT ST_ZMin(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)'));
st_zmin
-------
4

SELECT ST_ZMin('BOX3D(-3 2 1, 3 4 1)' );
st_zmin
-------
1
--Observe THIS DOES NOT WORK because it will try to auto-cast the string representation to a BOX3D
SELECT ST_ZMin('LINESTRING(1 3 4, 5 6 7)');

--ERROR:  BOX3D parser - doesn't start with BOX3D(

SELECT ST_ZMin(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 150406 3)'));
st_zmin
--------
1
		</programlisting>
	  </refsection>

	  <!-- Optionally add a "See Also" section -->
	  <refsection>
		<title>See Also</title>

		<para><xref linkend="ST_GeomFromEWKT"/>, <xref linkend="ST_GeomFromText"/>, <xref linkend="ST_XMin"/>, <xref linkend="ST_XMax"/>, <xref linkend="ST_YMax"/>, <xref linkend="ST_YMin"/>, <xref linkend="ST_ZMax"/></para>
	  </refsection>
	</refentry>

 </section>