-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathspatialite-sql-latest.html
6871 lines (6867 loc) · 514 KB
/
spatialite-sql-latest.html
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
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>SpatiaLite SQL functions reference list</title>
<style type="text/css">
h2 {color:navy; text-align:center;}
h3 {color:blue;}
b {color:brown;}
b.black {color:navy;}
i {color:navy;}
</style>
</head><body bgcolor="#fffff0">
<h2>SpatiaLite 5.0.1 SQL functions reference list</h2>
<a href="https://www.gaia-gis.it/fossil/libspatialite">back</a>
<ul>
<li><a href="#version">SQL Version Info [and build options testing] functions</a></li>
<li><a href="#generic">Generic SQL utility functions</a></li>
<li><a href="#global">Global settings per connection</a></li>
<li><a href="#sequence">SQL functions manipulating Sequences</a></li>
<li><a href="#math">SQL math functions</a></li>
<li><a href="#error">SQL functions reporting PROJ / GEOS / RTTOPO errors and warnings</a></li>
<li><a href="#length_cvt">SQL length/distance unit-conversion functions</a></li>
<li><a href="#dms_cvt">SQL conversion functions from DD/DMS notations (longitude/latitude)</a></li>
<li><a href="#blob">SQL utility functions for BLOB objects</a></li>
<li><a href="#p0">SQL utility functions [non-standard] for geometric objects</a></li>
<li><a href="#p1">SQL functions for constructing a geometric object given its Well-known Text Representation</a></li>
<li><a href="#p2">SQL functions for constructing a geometric object given its Well-known Binary Representation</a></li>
<li><a href="#p3">SQL functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object</a></li>
<li><a href="#p3misc">SQL functions supporting exotic geometric formats</a></li>
<li><a href="#p4">SQL functions on type Geometry</a></li>
<li><a href="#repair">SQL functions attempting to repair malformed Geometries</a></li>
<li><a href="#compress">SQL Geometry-compression functions</a></li>
<li><a href="#cast">SQL Geometry-type casting functions</a></li>
<li><a href="#dims-cast">SQL Space-dimensions casting functions</a></li>
<li><a href="#p5">SQL functions on type Point</a></li>
<li><a href="#p6">SQL functions on type Curve [Linestring or Ring]</a></li>
<li><a href="#p7">SQL functions on type LineString</a></li>
<li><a href="#p8">SQL functions on type Surface [Polygon or Ring]</a></li>
<li><a href="#p9">SQL functions on type Polygon</a></li>
<li><a href="#p10">SQL functions on type GeomCollection</a></li>
<li><a href="#p11">SQL functions that test approximate spatial relationships via MBRs</a></li>
<li><a href="#p12">SQL functions that test spatial relationships</a></li>
<li><a href="#p13">SQL functions for distance relationships</a></li>
<li><a href="#p14-">SQL functions supporting Linear Referencing</a></li>
<li><a href="#p14">SQL functions that implement spatial operators</a></li>
<li><a href="#p14b">SQL functions that implement spatial operators [GEOS specific features]</a></li>
<li><a href="#p14c">SQL functions that implement spatial operators [GEOS advanced features]</a></li>
<li><a href="#p14d">SQL functions that implement spatial operators [RTTOPO features]</a></li>
<li><a href="#p14e">SQL functions supporting Geodesic Arcs</a></li>
<li><a href="#p15">SQL functions for coordinate transformations</a></li>
<li><a href="#p15plus">SQL functions supporting Affine Transformations and Ground Control Points</a></li>
<li><a href="#p16">SQL functions for Spatial-MetaData and Spatial-Index handling</a></li>
<li><a href="#p16metacatalog">SQL functions supporting the MetaCatalog and related Statistics</a></li>
<li><a href="#p16style">SQL functions supporting SLD/SE Styled Layers</a></li>
<li><a href="#p16isometa">SQL functions supporting ISO Metadata</a></li>
<li><a href="#p16fdo">SQL functions implementing FDO/OGR compatibility</a></li>
<li><a href="#p16gpkg">SQL functions implementing OGC GeoPackage compatibility</a></li>
<li><a href="#p17">SQL functions for MbrCache-based queries</a></li>
<li><a href="#p18">SQL functions for R*Tree-based queries (Geometry Callbacks)</a></li>
<li><a href="#xmlBlob">SQL functions supporting XmlBLOB</a></li>
<li><a href="#srid">SQL functions supporting SRID inspection</a></li>
<li><a href="#proj6">SQL functions supporting new PROJ.6 API</a></li>
<li><a href="#topology">SQL functions supporting Topology-Geometry</a></li>
<li><a href="#network">SQL functions supporting Topology-Network</a></li>
<li><a href="#wms">SQL functions supporting WMS datasources</a></li>
<li><a href="#datalic">SQL functions supporting Data Licenses</a></li>
<li><a href="#advanced">miscellaneous advanced SQL functions</a></li>
<li><a href="#sqlproc">SQL Procedures, Stored Procedures and Stored Variables related SQL functions</a></li>
</ul>
<table bgcolor="#e2eae2" border="1" cellpadding="2" cellspacing="2" width="100%">
<tbody><tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="version">SQL Version Info [and build options testing] functions</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>spatialite_version</b></td>
<td>spatialite_version( void ) : <i>String</i></td>
<td colspan="3">returns the current <b>SpatiaLite</b> version as a text string</td></tr>
<tr><td><b>spatialite_target_cpu</b></td>
<td>spatialite_target_cpu( void ) : <i>String</i></td>
<td colspan="3">returns the current <b>SpatiaLite</b> Target CPU as a text string</td></tr>
<tr><td><b>check_strict_sql_quoting</b></td>
<td>rcheck_strict_sql_quoting( void ) : <i>String</i></td>
<td colspan="3">returns <b>TRUE</b> or<b>FALSE</b> depending on the actual behavior of current <b>SQLite</b>.<br>
<u><b>Note</b></u>:SQLite can effectively enforce strict SQL quoting (<b>single-quoted</b> text constants and <b>double-quoted</b> table and column names)
only since version <b>3.29.0</b>, depending on build-time settings.</td></tr>
<tr><td><b>freexl_version</b></td>
<td>freexl_version( void ) : <i>String</i></td>
<td colspan="3">returns the current <b>FreeXL</b> version as a text string<br>
or NULL if FreeXL is currently unsupported</td></tr>
<tr><td><b>proj_version</b></td>
<td>proj_version( void ) : <i>String</i><hr>
proj4_version( void ) : <i>Sting</i></td>
<td colspan="3">returns the current <b>PROJ</b> version as a text string<br>
or NULL if PROJ is currently unsupported.<hr>
Due to historical reasons there are two alias names for the same functionality.<br>
<u>Note</u>: <b>proj4_version()</b> is now <b>deprecated</b> and will be possibly removed in future versions.</td></tr>
<tr><td><b>geos_version</b></td>
<td>geos_version( void ) : <i>String</i></td>
<td colspan="3">returns the current <b>GEOS</b> version as a text string<br>
or NULL if GEOS is currently unsupported</td></tr>
<tr><td><b>rttopo_version</b></td>
<td>rttopo_version( void ) : <i>String</i></td>
<td colspan="3">returns the current <b>RTTOPO</b> version as a text string<br>
or NULL if RTTOPO is currently unsupported</td></tr>
<tr><td><b>libxml2_version</b></td>
<td>libxml2_version( void ) : <i>String</i></td>
<td colspan="3">returns the current <b>LibXML2</b> version as a text string<br>
or NULL if LibXML2 is currently unsupported</td></tr>
<tr><td><b>HasIconv</b></td>
<td>HasIconv( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>ICONV</b></td></tr>
<tr><td><b>HasMathSQL</b></td>
<td>HasMathSQL( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>MATHSQL</b></td></tr>
<tr><td><b>HasGeoCallbacks</b></td>
<td>HasGeoCallbacks( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>GEOCALLBACKS</b></td></tr>
<tr><td><b>HasProj</b></td>
<td>HasProj( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>PROJ</b></td></tr>
<tr><td><b>HasProj6</b></td>
<td>HasProj6( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>PROJ version 6</b> or any later</td></tr>
<tr><td><b>HasGeos</b></td>
<td>HasGeos( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>GEOS</b></td></tr>
<tr><td><b>HasGeosAdvanced</b></td>
<td>HasGeosAdvanced( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSADVANCED</b></td></tr>
<tr><td><b>HasGeosTrunk</b></td>
<td>HasGeosTrunk( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSTRUNK</b></td></tr>
<tr><td><b>HasGeosReentrant</b></td>
<td>HasGeosReentrant( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSREENTRANT</b></td></tr>
<tr><td><b>HasGeosOnlyReentrant</b></td>
<td>HasGeosOnlyReentrant( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>GEOSONLYREENTRANT</b></td></tr>
<tr><td><b>HasMiniZip</b></td>
<td>HasMiniZip( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>MINIZIP</b></td></tr>
<tr><td><b>HasRtTopo</b></td>
<td>HasRtTopo( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>RTTOPO</b></td></tr>
<tr><td><b>HasLibXML2</b></td>
<td>HasLibXML2( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>LibXML2</b></td></tr>
<tr><td><b>HasEpsg</b></td>
<td>HasEpsg( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>EPSG</b></td></tr>
<tr><td><b>HasFreeXL</b></td>
<td>HasFreeXL( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>FREEXL</b></td></tr>
<tr><td><b>HasGeoPackage</b></td>
<td>HasGeoPackage( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>GeoPackage</b> support (<b>GPKG</b>)</td></tr>
<tr><td><b>HasGCP</b></td>
<td>HasGCP( void ) : <i>Boolean</i><hr>
HasGroundControlPoints ( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>Ground Control Points</b> support (<b>GGP</b>)</td></tr>
<tr><td><b>HasTopology</b></td>
<td>HasTopology( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>Topology</b> (RTTOPO) support</td></tr>
<tr><td><b>HasKNN</b></td>
<td>HasKNN( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>VirtualKNN</b> (KNN) support</td></tr>
<tr><td><b>HasRouting</b></td>
<td>HasRouting( void ) : <i>Boolean</i></td>
<td colspan="3">TRUE if the underlying library was built enabling <b>VirtualRouting</b> support</td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="generic">Generic SQL functions</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>IsInteger</b></td>
<td>IsInteger( value <i>Text</i> ) : <i>Integer</i></td>
<td colspan="3">Checks a TEXT string testing if it corresponds to an Integer Number.<br>
The function returns <b>1</b> if <b>TRUE</b> and <b>0</b> if <b>FALSE</b>; <b>-1</b> is returned when the argument is not a Text string.<hr>
Examples of valid Integer strings:
<ul>
<li><b>'1234'</b></li>
<li><b>'+5678'</b></li>
<li><b>'-4321'</b></li>
<li><b>' +12345678'</b></li>
</ul></td></tr>
<tr><td><b>IsDecimalNumber</b></td>
<td>IsDecimalNumber( value <i>Text</i> ) : <i>Integer</i></td>
<td colspan="3">Checks a TEXT string testing if it corresponds to a Decimal Number.<br>
The function returns <b>1</b> if <b>TRUE</b> and <b>0</b> if <b>FALSE</b>; <b>-1</b> is returned when the argument is not a Text string.<hr>
Examples of valid Decimal Number strings:
<ul>
<li><b>'1234.56'</b></li>
<li><b>'+5678.09'</b></li>
<li><b>'-4321.67'</b></li>
<li><b>'-4321.67e12'</b></li>
<li><b>'6789.123E+6'</b></li>
<li><b>' +1234.56e-6'</b></li>
</ul></td></tr>
<tr><td><b>IsNumber</b></td>
<td>IsNumber( value <i>Text</i> ) : <i>Integer</i></td>
<td colspan="3">Checks a TEXT string testing if it corresponds to a Number.<br>
The function returns <b>1</b> if <b>TRUE</b> and <b>0</b> if <b>FALSE</b>; <b>-1</b> is returned when the argument is not a Text string.<hr>
convenience predicate: same as <b>IsInteger(value) OR IsDecimalNumber(value)</b>.</td></tr>
<tr><td><b>CastToInteger</b></td>
<td>CastToInteger( value <i>Generic</i> ) : <i>Integer</i></td>
<td colspan="3">returns the intput value possibly casted to the Integer data-type; NULL if no conversion is possible.</td></tr>
<tr><td><b>CastToDouble</b></td>
<td>CastToDouble( value <i>Generic</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the intput value possibly casted to the Double data-type; NULL if no conversion is possible.</td></tr>
<tr><td><b>CastToText</b></td>
<td>CastToText( value <i>Generic</i> ) : <i>Text</i><hr>
CastToText( value <i>Generic</i> , zero_pad <i>Integer</i> ) : <i>Text</i></td>
<td colspan="3">returns the intput value possibly casted to the Text data-type; NULL if no conversion is possible.<br>
If an optional argument <b>zero_pad</b> is passed and the input value is of the Integer or Double type, then the returned string will be padded using as many trailing ZEROs needed to ensure the required length.</td></tr>
<tr><td><b>CastToBlob</b></td>
<td>CastToBlob( value <i>Generic</i> ) : <i>Blob</i><hr>
CastToBlob( value <i>Generic</i> , hex_input <i>Boolean</i> ) : <i>Blob</i></td>
<td colspan="3">returns the intput value possibly casted to the BLOB data-type:
if the optional argument <b>hex_input</b> is set to <b>TRUE</b> the input value will be expected to correspond to an HexaDecimal string, e.g. <b>01ab89EF</b>; if this conversion fails then NULL will be returned.<hr>
returns NULL if no conversion is possible.</td></tr>
<tr><td><b>ForceAsNull</b></td>
<td>ForceAsNull( val1 <i>Generic</i> , val2 <i>Generic</i>) : <i>Generic</i></td>
<td colspan="3">if <b>val1</b> and <b>val2</b> are equal (and of the same data-type) NULL will be returned;
otherwise <b>val1</b> will be returned unchanged, preserving its original data-type.</td></tr>
<tr><td><b>GetDbObjectScope</b></td>
<td>GetDbObjectScope( db-prefix <i>Text</i> , obj-name <i>Text</i> ) : <i>Text</i></td>
<td colspan="3"><ul>
<li><i>db-prefix</i> can be <b>NULL</b>, and in this case the <b>"MAIN"</b> database will be assumed.</li>
<li><i>obj-name</i> must identify any valid DB-Object (<i>Table</i>. <i>View</i>, <i>Trigger</i> or <i>Index</i>).</li>
</ul><hr>
Returns a short description about the intended scope of any valid DB-Object.<br>
<b>NULL</b> on invalid DB-objects.</td></tr>
<tr><td><b>CreateUUID</b></td>
<td>CreateUUID( void ) : <i>Text</i></td>
<td colspan="3">returns a Version 4 (random) UUID (<a href="http://en.wikipedia.org/wiki/Universally_unique_identifier">Universally unique identifier</a>).</td></tr>
<tr><td><b>MD5Checksum</b></td>
<td>MD5Checksum( BLOB | TEXT ) : <i>Text</i></td>
<td colspan="3">returns the <a href="http://en.wikipedia.org/wiki/MD5">MD5 checksum</a> corresponding to the input value.<br>Will return <b>NULL</b> for non-BLOB or non-TEXT input.</td></tr>
<tr><td><b>MD5TotalChecksum</b></td>
<td>MD5TotalChecksum( BLOB | TEXT ) : <i>Text</i></td>
<td colspan="3">returns a cumulative MD5 checksum.<br><b><u>aggregate function</u></b></td></tr>
<tr><td><b>EncodeURL</b></td>
<td>EncodeURL( url <i>Text</i> ) : <i>Text</i><hr>
EncodeURL( url <i>Text</i> , charset <i>Text</i> ) : <i>Text</i></td>
<td colspan="3">returns the <a href="http://en.wikipedia.org/wiki/Percent-encoding">percent encoded URL</a> corresponding to the input value.<br>Will return <b>NULL</b> for invalid input.
<ul>
<li>the <u>input URL</u> is always assumed to be an <b>UTF-8</b> string.</li>
<li>the <u>output URL</u> will be converted into the charset encoding specified by the <b>charset</b> argument.<br>
if not specified <b>UTF-8</b> will be assumed by default.</li>
</ul></td></tr>
<tr><td><b>DecodeURL</b></td>
<td>DecodeURL( url <i>Text</i> ) : <i>Text</i><hr>
DecodeURL( url <i>Text</i>, charset <i>Text</i> ) : <i>Text</i></td>
<td colspan="3">returns a plain URL from its corresponding percent encoding.<br>Will return <b>NULL</b> for invalid input.
<ul>
<li>the <u>output URL</u> will be always returned as an <b>UTF-8</b> string.</li>
<li>the <u>input URL</u> will be converted from the charset encoding specified by the <b>charset</b> argument.<br>
if not specified <b>UTF-8</b> will be assumed by default.</li>
</ul></td></tr>
<tr><td><b>DirNameFromPath</b></td>
<td>DirNameFromPath( TEXT ) : <i>Text</i></td>
<td colspan="3">returns the Directory Name from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any simple path lacking a Directory.</td></tr>
<tr><td><b>FullFileNameFromPath</b></td>
<td>FullFileNameFromPath( TEXT ) : <i>Text</i></td>
<td colspan="3">returns the Full File Name (including an eventual File Extension) from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
lacking a File Name.</td></tr>
<tr><td><b>FileNameFromPath</b></td>
<td>FileNameFromPath( TEXT ) : <i>Text</i></td>
<td colspan="3">returns the File Name (excluding an eventual File Extension) from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
lacking a File Name.</td></tr>
<tr><td><b>FileExtFromPath</b></td>
<td>FileExtFromPath( TEXT ) : <i>Text</i></td>
<td colspan="3">returns the File Extension from a relative or absolute Pathname.<br>Will return <b>NULL</b> for invalid input of for any path
lacking a File Name or when no Extension is present.</td></tr>
<tr><td><b>RemoveExtraSpaces</b></td>
<td>RemoveExtraSpaces( TEXT ) : <i>Text</i></td>
<td colspan="3">returns a text string containing no repeated whitespaces (<b>SPACE</b> or <b>TAB</b> characters).<br>Will return <b>NULL</b> for invalid input.</td></tr>
<tr><td><b>MakeStringList</b></td>
<td>MakeStringList( value ) : <i>Text</i><hr>
MakeStringList( value , delimiter <i>text</i>) : <i>Text</i></td>
<td colspan="3">returns a comma-delimited list of integer or text values.<br>
the optional argument <b>delimiter</b> can be used so to specify an alternative delimiter different from comma.<br>
<b><u>aggregate function</u></b><hr>
Will return <b>NULL</b> for invalid arguments.</td></tr>
<tr><td><b>eval</b></td>
<td>eval( X <i>TEXT</i> [ , Y <i>TEXT</i> ) : <i>Text</i></td>
<td colspan="3">Evaluate the SQL text in <b>X</b>. Return the results, using string <b>Y</b> as the separator.<br>
If <b>Y</b> is omitted, use a single space character.<hr>
Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is absolutely required in order to enable this function.</td></tr>
<tr><td><b>PostgreSQL_GetLastError</b></td>
<td>PostgreSQL_GetLastError() : <i>Text</i></td>
<td colspan="3">returns the most recent error message raised by PostgreSQL.<br>
<b>NULL</b> if there is no pending error message available.</td></tr>
<tr><td><b>PostgreSQL_ResetLastError</b></td>
<td>PostgreSQL_ResetLastError() : <i>Integer</i></td>
<td colspan="3">Resets the most recent error message raised by PostgreSQL.<br>
Returns <b>1</b> on success and <b>0</b> on failure.<hr>
Only intended for internal usage by the <b>VirtualPostgres</b> extension module.</td></tr>
<tr><td><b>PostgreSQL_SetLastError</b></td>
<td>PostgreSQL_SetLastError( <i>TEXT</i> ) : <i>Integer</i></td>
<td colspan="3">Permanently sets the most recent error message raised by PostgreSQL.<br>
Returns <b>1</b> on success and <b>0</b> on failure; <b>-1</b> if the argument is not a Text string.<hr>
Only intended for internal usage by the <b>VirtualPostgres</b> extension module.</td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="global">Global settings per connection</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>EnableGpkgMode</b></td>
<td>EnableGpkgMode( <i>void</i> ) : <i>void</i></td>
<td colspan="3">Enables the <b>Geopackage mode</b><br>
All connections are initially started with a disabled GPKG mode, that must be explicitly enabled whenever required.<br>
Enabling GPKG mode is a supported option only if the currently connected DB-file presents a GPKG layout.</td></tr>
<tr><td><b>DisableGpkgMode</b></td>
<td>DisableGpkgMode( <i>void</i> ) : <i>void</i></td>
<td colspan="3">Disables the <b>Geopackage mode</b></td></tr>
<tr><td><b>GetGpkgMode</b></td>
<td>GetGpkgMode( <i>void</i> ) : <i>boolean</i></td>
<td colspan="3">Returns <b>TRUE</b> if the <b>Geopackage mode</b> is currently enabled, otherwise <b>FALSE</b></td></tr>
<tr><td><b>EnableGpkgAmphibiousMode</b></td>
<td>EnableGpkgAmphibiousMode( <i>void</i> ) : <i>void</i></td>
<td colspan="3">Enables the <b>Geopackage amphibious mode</b><br>
All connections are initially started with a disabled amphibious mode, that must be explicitly enabled whenever required.<br>
<u>Note</u>: <i>GPKG mode</i> and <i>GPKG amphibious mode</i> are mutually exclusive options.</td></tr>
<tr><td><b>DisableGpkgAmphibiousMode</b></td>
<td>DisableGpkgAmphibiousMode( <i>void</i> ) : <i>void</i></td>
<td colspan="3">Disables the <b>Geopackage amphibious mode</b></td></tr>
<tr><td><b>GetGpkgAmphibiousMode</b></td>
<td>GetGpkgAmphibiousMode( <i>void</i> ) : <i>boolean</i></td>
<td colspan="3">Returns <b>TRUE</b> if the <b>Geopackage amphibious mode</b> is currently enabled, otherwise <b>FALSE</b></td></tr>
<tr><td><b>SetDecimalPrecision</b></td>
<td>SetDecimalPrecision( <i>integer</i> ) : <i>void</i></td>
<td colspan="3">Explicitly sets the number of decimal digits (<i>precision</i>) to be displayed by <b>ST_AsText()</b> for coordinate values: the standard default setting is <b>6</b> decimal digits.<br>
Passing any <b>negative</b> precision will automatically restore the initial default setting.<br>
The <b>spatialite_gui</b> tool will honor this setting for all floating point values to be displayed on the screen.</td></tr>
<tr><td><b>GetDecimalPrecision</b></td>
<td>GetDecimalPrecision( <i>void</i> ) : <i>integer</i></td>
<td colspan="3">Returns the currently set <b>decimal precision</b>.<br>
A <b>negative</b> precision identifies the default setting.</td></tr>
<tr><td><b>EnableTinyPoint</b></td>
<td>EnableTinyPoint( <i>void</i> ) : <i>void</i></td>
<td colspan="3">Enables the <b>TinyPoint</b> BLOB encoding for all Point-Geometries being created.<br>
All connections are initially started with a disabled TinyPoint BLOB encoding, that must be explicitly enabled whenever required.<br><hr>
<u>Exception</u>: if the environment variable <b>SPATIALITE_TINYPOINT=1</b> is set, then all connections will initially start by enabling the TinyPoint BLOB encoding.</td></tr>
<tr><td><b>DisableTinyPoint</b></td>
<td>DisableTinyPoint( <i>void</i> ) : <i>void</i></td>
<td colspan="3">Disables the <b>TinyPoint</b> BLOB encoding; all Point-Geometries will then be created applying the classic BLOB-Geometry encoding.</td></tr>
<tr><td><b>IsTinyPointEnabled</b></td>
<td>IsTinyPointEnabled( <i>void</i> ) : <i>boolean</i></td>
<td colspan="3">Returns <b>TRUE</b> if the <b>TinyPoint</b> BLOB encoding is currently enabled, otherwise <b>FALSE</b></td></tr>
<tr><td><b>BufferOptions_Reset</b></td>
<td>BufferOptions_Reset( <i>void</i> ) : <i>boolean</i></td>
<td colspan="3">Will reset all BufferOptions to their initial default settings.<br>
Returns <b>TRUE</b> on success, <b>FALSE</b> on failure.</td></tr>
<tr><td><b>BufferOptions_SetEndCapStyle</b></td>
<td>BufferOptions_SetEndCapStyle( style <i>Text</i> ) : <i>boolean</i></td>
<td colspan="3">Will set the current EndCap Style. Accepted styles (<i>case insensitive</i>) are: <b>ROUND</b>, <b>FLAT</b>, <b>SQUARE</b><br>
Returns <b>TRUE</b> on success, <b>FALSE</b> on failure.</td></tr>
<tr><td><b>BufferOptions_GetEndCapStyle</b></td>
<td>BufferOptions_GetEndCapStyle( <i>void</i> ) : <i>string</i></td>
<td colspan="3">Will return the name of the currently set EndCap Style.<br>
<b>NULL</b> on failure.</td></tr>
<tr><td><b>BufferOptions_SetJoinStyle</b></td>
<td>BufferOptions_SetJoinStyle( style <i>Text</i> ) : <i>boolean</i></td>
<td colspan="3">Will set the current Join Style. Accepted styles (<i>case insensitive</i>) are: <b>ROUND</b>, <b>MITRE</b> or <b>MITER</b>, <b>BEVEL</b><br>
Returns <b>TRUE</b> on success, <b>FALSE</b> on failure.</td></tr>
<tr><td><b>BufferOptions_GetJoinStyle</b></td>
<td>BufferOptions_GetJoinStyle( <i>void</i> ) : <i>string</i></td>
<td colspan="3">Will return the name of the currently set Join Style.<br>
<b>NULL</b> on failure.</td></tr>
<tr><td><b>BufferOptions_SetMitreLimit</b></td>
<td>BufferOptions_SetMitreLimit( limit <i>Double</i> ) : <i>boolean</i></td>
<td colspan="3">Will set the current Mitre Limit value.<br>
Returns <b>TRUE</b> on success, <b>FALSE</b> on failure.</td></tr>
<tr><td><b>BufferOptions_GetMitreLimit</b></td>
<td>BufferOptions_GetMitreLimit( <i>void</i> ) : <i>double</i></td>
<td colspan="3">Will return the value of the currently set Mitre Limit.<br>
<b>NULL</b> on failure.</td></tr>
<tr><td><b>BufferOptions_SetQuadrantSegments</b></td>
<td>BufferOptions_SetQuadrantSegments( points <i>Integer</i> ) : <i>boolean</i></td>
<td colspan="3">Will set the current Quadrant Segments value.<br>
Returns <b>TRUE</b> on success, <b>FALSE</b> on failure.</td></tr>
<tr><td><b>BufferOptions_GetQuadrantSegments</b></td>
<td>BufferOptions_GetQuadrantSegments( <i>void</i> ) : <i>integer</i></td>
<td colspan="3">Will return the value of the currently set Quadrant Segments.<br>
<b>NULL</b> on failure.</td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="sequence">SQL functions manipulating Sequences</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>sequence_nextval</b></td>
<td>sequence_nextval ( seq_name <i>Text</i> ) : <i>Integer</i></td>
<td colspan="3">advances to the next value of the Sequence, which is then returned.<br>
Will return <b>NULL</b> if any error occurred.</td></tr>
<tr><td><b>sequence_currval</b></td>
<td>sequence_currval ( seq_name <i>Text</i> ) : <i>Integer</i></td>
<td colspan="3">returns the value most recently obtained by <b>sequence_nextval()</b> for the Sequence identified by <i>seq_name</i><br>
Will return <b>NULL</b> if the Sequence identified by <i>seq_name</i> has not yet been used.</td></tr>
<tr><td><b>sequence_lastval</b></td>
<td>sequence_lastval ( <i>void</i> ) : <i>Integer</i></td>
<td colspan="3">returns the value most recently obtained by <b>sequence_nextval()</b><br>
Will return <b>NULL</b> if <b>sequence_nextval()</b> has not yet been used.</td></tr>
<tr><td><b>sequence_setval</b></td>
<td>sequence_setval ( seq_name <i>Text</i> , value <i>Integer</i> ) : <i>Integer</i></td>
<td colspan="3">sets the current <i>value</i> for the Sequence identified by <b>seq_name</b>; if the Sequence doesn't yet exist it will be created on-the-fly.<br>
Will return <i>value</i> on success or <b>NULL</b> on failure.</td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="math">SQL math functions</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>Abs</b></td>
<td>Abs( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the absolute value of <b>x</b></td></tr>
<tr><td><b>Acos</b></td>
<td>Acos( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the arc cosine of <b>x</b>, that is, the value whose cosine is <b>x</b><br>
returns NULL if <b>x</b> is not within the range -1 to 1</td></tr>
<tr><td><b>Asin</b></td>
<td>Asin( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the arc sine of <b>x</b>, that is, the value whose sine is <b>x</b><br>
returns NULL if <b>x</b> is not in the range -1 to 1</td></tr>
<tr><td><b>Atan</b></td>
<td>Atan( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the arc tangent of <b>x</b>, that is, the value whose tangent is <b>x</b></td></tr>
<tr><td><b>Atan2</b></td>
<td>Atan2( y <i>Double precision</i> , x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the principal value of the arc tangent of <b>y/x</b> in radians, using the signs of the two
arguments to determine the quadrant of the result. The return value is in the range[<b>-pi</b>, <b>pi</b>].</td></tr>
<tr><td><b>Ceil<br>Ceiling</b></td>
<td>Ceil( x <i>Double precision</i> ) : <i>Double precision</i><hr>
Ceiling( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the smallest integer value not less than <b>x</b></td></tr>
<tr><td><b>Cos</b></td>
<td>Cos( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the cosine of <b>x</b>, where <b>x</b> is given in <u>radians</u></td></tr>
<tr><td><b>Cot</b></td>
<td>Cot( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the cotangent of <b>x</b>, where <b>x</b> is given in <u>radians</u></td></tr>
<tr><td><b>Degrees</b></td>
<td>Degrees( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the argument <b>x</b>, converted from radians to degrees</td></tr>
<tr><td><b>Exp</b></td>
<td>Exp( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the value of <b><i>e</i></b> (the base of natural logarithms) raised to the power of <b>x</b><hr>
the inverse of this function is <b>Log()</b> (using a single argument only) or <b>Ln()</b></td></tr>
<tr><td><b>Floor</b></td>
<td>Floor( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the largest integer value not greater than <b>x</b></td></tr>
<tr><td><b>Ln</b><br><b>Log</b></td>
<td>Ln( x <i>Double precision</i> ) : <i>Double precision</i><hr>
Log( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the natural logarithm of <b>x</b>; that is, the base-<b><i>e</i></b> logarithm of <b>x</b><br>
If <b>x</b> is less than or equal to 0, then NULL is returned</td></tr>
<tr><td><b>Log</b></td>
<td>Log( x <i>Double precision</i> , b <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the logarithm of <b>x</b> to the base <b>b</b><br>
If <b>x</b> is less than or equal to 0, or if <b>b</b> is less than or equal to 1, then NULL is returned<hr>
<b>Log(x, b)</b> is equivalent to <b>Log(x)</b> / <b>Log(b)</b></td></tr>
<tr><td><b>Log2</b></td>
<td>Log2( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the base-2 logarithm of <b>x</b><hr>
<b>Log2(x)</b> is equivalent to <b>Log(x)</b> / <b>Log(2)</b></td></tr>
<tr><td><b>Log10</b></td>
<td>Log10( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the base-10 logarithm of <b>x</b><hr>
<b>Log10(x)</b> is equivalent to <b>Log(x)</b> / <b>Log(10)</b></td></tr>
<tr><td><b>PI</b></td>
<td>PI( void ) : <i>Double precision</i></td>
<td colspan="3">returns the value of <b>PI</b></td></tr>
<tr><td><b>Pow</b><br><b>Power</b></td>
<td>Pow( x <i>Double precision</i> , y <i>Double precision</i> ) : <i>Double precision</i><hr>
Power( x <i>Double precision</i> , y <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the value of <b>x</b> raised to the power of <b>y</b></td></tr>
<tr><td><b>Radians</b></td>
<td>Radians( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the argument <b>x</b>, converted from degrees to radians</td></tr>
<tr><td><b>Sign</b></td>
<td>Sign( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the sign of the argument as -1, 0, or 1,
depending on whether <b>x</b> is negative, zero, or positive. </td></tr>
<tr><td><b>Sin</b></td>
<td>Sin( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the sine of <b>x</b>, where <b>x</b> is given in <u>radians</u></td></tr>
<tr><td><b>Sqrt</b></td>
<td>Sqrt( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the square root of a non-negative number <b>x</b></td></tr>
<tr><td><b>Stddev_pop</b></td>
<td>Stddev_pop( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the population standard deviation of the input values<br><b><u>aggregate function</u></b></td></tr>
<tr><td><b>Stddev_samp</b></td>
<td>Stddev_samp( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the sample standard deviation of the input values<br><b><u>aggregate function</u></b></td></tr>
<tr><td><b>Tan</b></td>
<td>Tan( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the tangent of <b>x</b>, where <b>x</b> is given in <u>radians</u></td></tr>
<tr><td><b>Var_pop</b></td>
<td>Var_pop( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the population variance of the input values (<i>square of the population standard deviation</i>)<br>
<b><u>aggregate function</u></b></td></tr>
<tr><td><b>Var_samp</b></td>
<td>Var_samp( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3">returns the sample variance of the input values (<i>square of the sample standard deviation</i>)<br>
<b><u>aggregate function</u></b></td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="error">SQL functions reporting PROJ / GEOS / RTTOPO errors and warnings</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>PROJ_GetLastErrorMsg</b></td>
<td>PROJ_GetLastErrorMsg( <i>void</i> ) : <i>String</i></td>
<td align="center" bgcolor="##d0d0f0">PROJ</td>
<td colspan="2">Will return the most recent error message returned by PROJ (if any).<hr>
<b>NULL</b> will be returned if there is no pending PROJ error.<br>
<u>Note</u>: this SQL function will be available only when SpatiaLite is built on <b>PROJ.6</b> (or any later version).</td></tr>
<tr><td><b>GEOS_GetLastWarningMsg</b></td>
<td>GEOS_GetLastWarningMsg( <i>void</i> ) : <i>String</i></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td colspan="2">Will return the most recent warning message returned by GEOS (if any).<hr>
<b>NULL</b> will be returned if there is no pending GEOS warning.</td></tr>
<tr><td><b>GEOS_GetLastErrorMsg</b></td>
<td>GEOS_GetLastErrorMsg( <i>void</i> ) : <i>String</i></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td colspan="2">Will return the most recent error message returned by GEOS (if any).<hr>
<b>NULL</b> will be returned if there is no pending GEOS error.</td></tr>
<tr><td><b>GEOS_GetLastAuxErrorMsg</b></td>
<td>GEOS_GetLastAuxErrorMsg( <i>void</i> ) : <i>String</i></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td colspan="2">Will return the most recent error message (auxiliary) returned by GEOS (if any).<hr>
<b>NULL</b> will be returned if there is no pending GEOS (auxiliary) error.</td></tr>
<tr><td><b>GEOS_GetCriticalPointFromMsg</b></td>
<td>GEOS_GetCriticalPointFromMsg( <i>void</i> ) : <i>Point</i><hr>
GEOS_GetCriticalPointFromMsg( SRID <i>Integer</i> ) : <i>Point</i></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td colspan="2">Will (possibly) return a Point Geometry extracted from the latest error / warning
message returned by GEOS.<hr>
<b>NULL</b> will be returned if there is no pending GEOS message, or if the current GEOS message
doesn't contain a critical Point.</td></tr>
<tr><td><b>RTTOPO_GetLastWarningMsg</b></td>
<td>RTTOPO_GetLastWarningMsg( <i>void</i> ) : <i>String</i></td>
<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
<td colspan="2">Will return the most recent warning message returned by RTTOPO (if any).<hr>
<b>NULL</b> will be returned if there is no pending RTTOPO warning.</td></tr>
<tr><td><b>RTTOPO_GetLastErrorMsg</b></td>
<td>RTTOPO_GetLastErrorMsg( <i>void</i> ) : <i>String</i></td>
<td align="center" bgcolor="#f0d0f0">RTTOPO</td>
<td colspan="2">Will return the most recent error message returned by RTTOPO (if any).<hr>
<b>NULL</b> will be returned if there is no pending RTTOPO error.</td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="length_cvt">SQL length/distance unit-conversion functions</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>Kilometer</b></td>
<td>CvtToKm( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromKm( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>kilometers</b></td></tr>
<tr><td><b>Decimeter</b></td>
<td>CvtToDm( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromDm( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>decimeters</b></td></tr>
<tr><td><b>Centimeter</b></td>
<td>CvtToCm( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromCm( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>centimeters</b></td></tr>
<tr><td><b>Millimeter</b></td>
<td>CvtToMm( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromMm( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>millimeters</b></td></tr>
<tr><td><b>International Nautical Mile</b></td>
<td>CvtToKmi( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromKmi( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international nautical miles</b></td></tr>
<tr><td><b>International Inch</b></td>
<td>CvtToIn( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromIn( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international inches</b></td></tr>
<tr><td><b>International Foot</b></td>
<td>CvtToFt( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromFt( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international feet</b></td></tr>
<tr><td><b>International Yard</b></td>
<td>CvtToYd( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromYd( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international yards</b></td></tr>
<tr><td><b>International Statute Mile</b></td>
<td>CvtToMi( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromMi( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international statute miles</b></td></tr>
<tr><td><b>International Fathom</b></td>
<td>CvtToFath( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromFath( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international fathoms</b></td></tr>
<tr><td><b>International Chain</b></td>
<td>CvtToCh( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromCh( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international chains</b></td></tr>
<tr><td><b>International Link</b></td>
<td>CvtToLink( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromLink( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>international links</b></td></tr>
<tr><td><b>U.S. Inch</b></td>
<td>CvtToUsIn( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromUsIn( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>U.S. inches</b></td></tr>
<tr><td><b>U.S. Foot</b></td>
<td>CvtToUsFt( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromUsFt( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>U.S. feet</b></td></tr>
<tr><td><b>U.S. Yard</b></td>
<td>CvtToUsYd( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromUsYd( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>U.S. yards</b></td></tr>
<tr><td><b>U.S. Statute Mile</b></td>
<td>CvtToUsMi( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromUsMi( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>U.S. statute miles</b></td></tr>
<tr><td><b>U.S. Chain</b></td>
<td>CvtToUsCh( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromUsCh( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>U.S. chains</b></td></tr>
<tr><td><b>Indian Foot</b></td>
<td>CvtToIndFt( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromIndFt( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>indian feet</b></td></tr>
<tr><td><b>Indian Yard</b></td>
<td>CvtToIndYd( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromIndYd( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>indian yards</b></td></tr>
<tr><td><b>Indian Chain</b></td>
<td>CvtToIndCh( x <i>Double precision</i> ) : <i>Double precision</i><hr>
CvtFromIndCh( x <i>Double precision</i> ) : <i>Double precision</i></td>
<td colspan="3"><b>meters</b> / <b>indian chains</b></td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="dms_cvt">SQL conversion functions from DD/DMS notations (longitude/latitude)</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>DD to DMS</b></td>
<td>LongLatToDMS( longitude <i>Double precision</i> , latitude <i>Double precision</i> ) : <i>String</i><hr>
LongLatToDMS( longitude <i>Double precision</i> , latitude <i>Double precision</i> , decimal_digits <i>Integer</i> ) : <i>String</i></td>
<td colspan="3">will return a DMS string (Degrees, Minutes and Seconds) using the given DD (Decimal Degrees) input coordinates
<ul>
<li>the optional argument <b>decimal_digits</b>, when explicitly specified, will determine how many decimal digits must be used for representig Seconds.<br>
Zero (or a negative value) intends that Seconds will be represented by an integer value (default setting).</li>
</ul><hr>
<b>NULL</b> will be returned on invalid input.</tr>
<tr><td><b>DMS to DD</b></td>
<td>LongitudeFromDMS( dms_expression <i>String</i> ) : <i>Double precision</i><hr>
LatitudeFromDMS( dms_expression <i>String</i> ) : <i>Double precision</i></td>
<td colspan="3">will return the DD coordinates from within a DMS expression, which must contain both the Latitude and Longitude (in that order)<hr>
<b>NULL</b> will be returned on invalid input.</tr>
<tr><td colspan="5" align="center" bgcolor="#f0e0c0">
<h3><a name="blob">SQL utility functions for BLOB objects</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th colspan="3" bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>IsZipBlob</b></td>
<td>IsZipBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid ZIP-compressed file</td></tr>
<tr><td><b>IsPdfBlob</b></td>
<td>IsPdfBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid PDF document</td></tr>
<tr><td><b>IsGifBlob</b></td>
<td>IsGifBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid GIF image</td></tr>
<tr><td><b>IsPngBlob</b></td>
<td>IsPngBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid PNG image</td></tr>
<tr><td><b>IsTiffBlob</b></td>
<td>IsTiffBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid TIFF image</td></tr>
<tr><td><b>IsJpegBlob</b></td>
<td>IsJpegBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid JPEG image</td></tr>
<tr><td><b>IsExifBlob</b></td>
<td>IsExifBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid EXIF image<br>
<u>Please note:</u> any valid EXIF image is also a valid JPEG</td></tr>
<tr><td><b>IsExifGpsBlob</b></td>
<td>IsExifGpsBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid EXIF-GPS image<br>
<u>Please note:</u> any valid EXIF-GPS image is a valid EXIF and JPEG as well</td></tr>
<tr><td><b>IsWebpBlob</b></td>
<td>IsWebpBlob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid WebP image</td></tr>
<tr><td><b>IsJP2Blob</b></td>
<td>IsJP2Blob( image <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if this BLOB object corresponds to a valid JP2 [Jpeg2000] image</td></tr>
<tr><td><b>GetMimeType</b></td>
<td>GetMimeType( payload <i>BLOB</i> ) : <i>String</i></td>
<td colspan="3">The return type is Text, and could be one of: <b>image/gif</b>, <b>image/png</b>,
<b>image/jpeg</b>, <b>image/jp2</b>, <b>image/tiff</b>, <b>image/svg+xml</b>, <b>application/xml</b>,
<b>application/zip</b>, <b>application/pdf</b>.<br>
NULL will be returned when called with a NULL or non-BLOB argument, or if no valid mime-type is detected.</td></tr>
<tr><td><b>IsGeometryBlob</b></td>
<td>IsGeometryBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if the BLOB argument is a valid BLOB-Geometry.</td></tr>
<tr><td><b>IsCompressedGeometryBlob</b></td>
<td>IsCompressedGeometryBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if the BLOB argument is a valid BLOB-Geometry.</td></tr>
<tr><td><b>IsTinyPointBlob</b></td>
<td>IsTinyPointBlob( content <i>BLOB</i> ) : <i>Integer</i></td>
<td colspan="3">The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and –1 for UNKNOWN
when called with a NULL or non-BLOB argument.<hr>
TRUE if the BLOB argument is a valid BLOB-TinyPoint.</td></tr>
<tr><td><b>TinyPointEncode</b></td>
<td>TinyPointEncode( content <i>POINT BLOB-GEOMETRY</i> ) : <i>BLOB-TinyPoint</i></td>
<td colspan="3">If the input argument corresponds to a valid <b>BLOB-GEOMETRY</b> of the <b>POINT</b>, <b>POINT Z</b>, <b>POINT M</b> or <b>POINT ZM</b> type
the corresponding <b>BLOB-TinyPoint</b> will be returned.<hr>
In any other case the input argument will be retuned.</td></tr>
<tr><td><b>GeometryPointEncode</b></td>
<td>GeometryPointEncode( content <i>BLOB-TinyPoint</i> ) : <i>BLOB-GEOMETRY</i></td>
<td colspan="3">If the input argument corresponds to a valid <b>BLOB-TinyPoint</b> the corresponding <b>BLOB-GEOMETRY</b> will be returned.<hr>
In any other case the input argument will be retuned.</td></tr>
<tr><td><b>BlobFromFile</b></td>
<td>BlobFromFile( filepath <i>String</i> ) : <i>BLOB</i></td>
<td colspan="3">If the filepath is valid, and the existing file can be successfully read, then the whole file content will be returned as a
BLOB value.<br>
Otherwise NULL will be returned.<br>
<u>Please note:</u> SQLite doesn't support BLOB values bigger than SQLITE_MAX_LENGTH (usually, 1 GB).<hr>
<u>Please note well</u>: this SQL function opens the door to many potential security issues, and thus is always <i>disabled by default</i>.<br>
Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is required in order to use this function.</td></tr>
<tr><td><b>BlobToFile</b></td>
<td>BlobToFile( binary-data <i>BLOB</i> , filepath <i>String</i> ) : <i>Integer</i></td>
<td colspan="3">If <i>binary-data</i> is of the BLOB-type, and the filepath is valid (i.e. accessible in write/create mode),
then the corresponding file will be created/overwritten with the binary-data.<br>
The return type is Integer, with a return value of 1 for success, 0 for failure.<hr>
<u>Please note well</u>: this SQL function opens the door to many potential security issues, and thus is always <i>disabled by default</i>.<br>
Explicitly setting the environment variable <b>SPATIALITE_SECURITY=relaxed</b> is required in order to use this function.</td></tr>
<tr><td><b>CountUnsafeTriggers</b></td>
<td>CountUnsafeTriggers( ) : <i>Integer</i></td>
<td colspan="3">This SQL function checks if the currently connected DB contains any potentially malicious Triggers;
carefully checking this conditions is a minimal precaution expected to be always verified before eventually activating the <b>SPATIALITE_SECURITY=relaxed</b> mode.<hr>
The return type is Integer (total count of suspected Triggers); 0 means that the currently connected DB should be considered absolutely safe.</td></tr>
<tr><td colspan="5" align="center" bgcolor="#f0f0c0">
<h3><a name="p0">SQL utility functions [<i>non-standard</i>] for geometric objects</a></h3></td></tr>
<tr><th bgcolor="#d0d0d0">Function</th>
<th bgcolor="#d0d0d0">Syntax</th>
<th bgcolor="#d0d0d0">OGC<br>defined</th>
<th bgcolor="#d0d0d0">required<br>module</th>
<th bgcolor="#d0d0d0">Summary</th></tr>
<tr><td><b>GeomFromExifGpsBlob</b></td>
<td>GeomFromExifGpsBlob( image <i>BLOB</i> ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a POINT Geometry will be returned representing the GPS long/lat contained within EXIF-GPS <i>metadata</i>
for the BLOB image<hr>
NULL will be returned if for any reason it's not possible to create such a POINT</td></tr>
<tr><td><b>ST_Point</b></td>
<td>ST_Point( x <i>Double precision</i> , y <i>Double precision</i> ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>simply an alias-name for <b>MakePoint()</b><br>
<u>Please note</u>: the <u>SRID</u> argument is never supported by <u>ST_Point()</u></td></tr>
<tr><td><b>MakePoint</b></td>
<td>MakePoint( x <i>Double precision</i> , y <i>Double precision</i> ,
[ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a Geometry will be returned representing the POINT defined by [<b>x y</b>] coordinates</td></tr>
<tr><td><b>MakePointZ</b></td>
<td>MakePointZ( x <i>Double precision</i> , y <i>Double precision</i> , z <i>Double precision</i> ,
[ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a Geometry will be returned representing the POINT Z defined by [<b>x y z</b>] coordinates</td></tr>
<tr><td><b>MakePointM</b></td>
<td>MakePointM( x <i>Double precision</i> , y <i>Double precision</i> , m <i>Double precision</i> ,
[ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a Geometry will be returned representing the POINT M defined by [<b>x y m</b>] coordinates</td></tr>
<tr><td><b>MakePointZM</b></td>
<td>MakePointZM( x <i>Double precision</i> , y <i>Double precision</i> , z <i>Double precision</i> ,
m <i>Double precision</i> [ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a Geometry will be returned representing the POINT ZM defined by [<b>x y z m</b>] coordinates</td></tr>
<tr><td><b>MakeLine</b></td>
<td>MakeLine( pt1 <i>PointGeometry</i> , pt2 <i>PointGeometry</i> ) : <i>LinestringGeometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a Linestring Geometry will be returned representing the segment connecting <b>pt1</b> to <b>pt2</b><hr>
NULL will be returned if any error is encountered</td></tr>
<tr><td><b>MakeLine</b></td>
<td>MakeLine( geom <i>PointGeometry</i> ) : <i>LinestringGeometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a Linestring Geometry will be returned connecting all the input Points (accordingly to input sequence)<br>
<b><u>aggregate function</u></b><hr>
NULL will be returned if any error is encountered</td></tr>
<tr><td><b>MakeLine</b></td>
<td>MakeLine( geom <i>MultiPointGeometry</i> , direction <i>Boolean</i> ) : <i>LinestringGeometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>a Linestring Geometry will be returned connecting all the input Points (accordingly to input sequence); <b>direction=FALSE</b> implies <u>reverse order</u>.<br>
<u>Please note</u>: similar to the previuous one, but this one is an ordinary (not aggregate) function; a MultiPoint input is always expected.<hr>
NULL will be returned if any error is encountered</td></tr>
<tr><td><b>MakeCircle</b></td>
<td>MakeCircle( cx <i>Double precision</i> , cy <i>Double precision</i> ,
radius <i>Double precision</i> [ , SRID <i>Integer</i> [ ,
step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>will return a closed LINESTRING approximating the Circle defined by <b>cx, cy</b> and <b>radius</b>.<br>
The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
<tr><td><b>MakeEllipse</b></td>
<td>MakeEllipse( cx <i>Double precision</i> , cy <i>Double precision</i> ,
x_axis <i>Double precision</i> , y_axis <i>Double precision</i> [ , SRID <i>Integer</i> [ ,
step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>will return a closed LINESTRING approximating the Ellipse defined by <b>cx, cy</b> and <b>x_axis, y_axis</b>.<br>
The optional argument <b>step</b> if specified defines how many points will be interpolated on the ellipse; a point will be set every <b>step</b> degrees.<br>
The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
<tr><td><b>MakeArc</b></td>
<td>MakeArc( cx <i>Double precision</i> , cy <i>Double precision</i> ,
radius <i>Double precision</i> ,
start <i>Double precision</i> , stop <i>Double precision</i> [ , SRID <i>Integer</i> [ ,
step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>will return a LINESTRING approximating the Circular Arc defined by <b>cx, cy</b> and <b>radius</b>; the arc's extremities will be defined by <b>start, stop</b> angles expressed in degrees.<br>
The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
<tr><td><b>MakeEllipticArc</b></td>
<td>MakeEllipticArc( cx <i>Double precision</i> , cy <i>Double precision</i> ,
x_axis <i>Double precision</i> , y_axis <i>Double precision</i> ,
start <i>Double precision</i> , stop <i>Double precision</i> [ , SRID <i>Integer</i> [ ,
step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>will return a LINESTRING approximating the Elliptic Arc defined by <b>cx, cy</b> and <b>x_axis, y_axis</b>; the arc's extremities will be defined by <b>start, stop</b> angles expressed in degrees.<br>
The optional argument <b>step</b> if specified defines how many points will be interpolated on the ellipse; a point will be set every <b>step</b> degrees.<br>
The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
<tr><td><b>MakeCircularSector</b></td>
<td>MakeCircularSector( cx <i>Double precision</i> , cy <i>Double precision</i> ,
radius <i>Double precision</i> ,
start <i>Double precision</i> , stop <i>Double precision</i> [ , SRID <i>Integer</i> [ ,
step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>will return a POLYGON approximating the Circular Sector defined by <b>cx, cy</b> and <b>radius</b>; the arc's extremities will be defined by <b>start, stop</b> angles expressed in degrees.<br>
The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
<tr><td><b>MakeEllipticSector</b></td>
<td>MakeEllipticSector( cx <i>Double precision</i> , cy <i>Double precision</i> ,
x_axis <i>Double precision</i> , y_axis <i>Double precision</i> ,
start <i>Double precision</i> , stop <i>Double precision</i> [ , SRID <i>Integer</i> [ ,
step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>will return a POLYGON approximating the Elliptic Sector defined by <b>cx, cy</b> and <b>x_axis, y_axis</b>; the arc's extremities will be defined by <b>start, stop</b> angles expressed in degrees.<br>
The optional argument <b>step</b> if specified defines how many points will be interpolated on the ellipse; a point will be set every <b>step</b> degrees.<br>
The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
<tr><td><b>MakeCircularStripe</b></td>
<td>MakeCircularStripe( cx <i>Double precision</i> , cy <i>Double precision</i> ,
radius_1 <i>Double precision</i> , radius_2 <i>Double precision</i> ,
start <i>Double precision</i> , stop <i>Double precision</i> [ , SRID <i>Integer</i> [ ,
step <i>Double precision</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>will return a POLYGON approximating the Circular Stripe delimited by two arcs sharing the same Centre [<b>cx</b>, <b>cy</b>]
but having different radii [<b>radius_1</b>, <b>radius_2</b>]; the arc's extremities will be defined by <b>start, stop</b> angles expressed in degrees.<br>
The optional argument <b>step</b> if specified defines how many points will be interpolated on the circumference; a point will be set every <b>step</b> degrees.<br>
The implicit default setting corresponds to a point every <u>10</u> degrees.</td></tr>
<tr><td><b>SquareGrid</b></td>
<td>SquareGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
ST_SquareGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td>return a grid of square cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
The specific Type of returned Geometry is controlled by the <b>mode</b> attribute value:
<ul>
<li>any <i>positive</i> value will cause a <b>MultiLinestring</b> to be returned.</li>
<li><i>zero</i> (default value) will cause a <b>MultiPolygon</b> to be returned.</li>
<li>any <i>negative</i> value will cause a <b>MultiPoint</b> to be returned.</li>
</ul>
If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
NULL will be returned if any error is encountered.</td></tr>
<tr><td><b>TriangularGrid</b></td>
<td>TriangularGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
ST_TriangularGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td>return a grid of triangular cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
The specific Type of returned Geometry is controlled by the <b>mode</b> attribute value:
<ul>
<li>any <i>positive</i> value will cause a <b>MultiLinestring</b> to be returned.</li>
<li><i>zero</i> (default value) will cause a <b>MultiPolygon</b> to be returned.</li>
<li>any <i>negative</i> value will cause a <b>MultiPoint</b> to be returned.</li>
</ul>
If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
NULL will be returned if any error is encountered.</td></tr>
<tr><td><b>HexagonalGrid</b></td>
<td>HexagonalGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i><hr>
ST_HexagonalGrid( geom <i>ArealGeometry</i> , size <i>Double precision</i> [ , mode <i>Integer</i> , [ origin <i>PointGeometry</i> ] ] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#f0d0d0">GEOS</td>
<td>return a grid of hexagonal cells (having the edge length of <i>size</i>) precisely covering the input Geometry.<br>
The specific Type of returned Geometry is controlled by the <b>mode</b> attribute value:
<ul>
<li>any <i>positive</i> value will cause a <b>MultiLinestring</b> to be returned.</li>
<li><i>zero</i> (default value) will cause a <b>MultiPolygon</b> to be returned.</li>
<li>any <i>negative</i> value will cause a <b>MultiPoint</b> to be returned.</li>
</ul>
If the optional <b>origin</b> argument (expected to be a Point) is not specified then the (0,0) grid origin will be assumed by default.<hr>
NULL will be returned if any error is encountered.</td></tr>
<tr><td><b>BuildMbr</b></td>
<td>BuildMbr( x1 <i>Double precision</i> , y1 <i>Double precision</i> ,
x2 <i>Double precision</i> , y2 <i>Double precision</i> [ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>[<b>x1 y1</b>] and [<b>x2 y2</b>] are assumed to be Points identifying a line segment;
then a Geometry will be returned representing the MBR for this line segment</td></tr>
<tr><td><b>BuildCircleMbr</b></td>
<td>BuildCircleMbr( x <i>Double precision</i> , y <i>Double precision</i> ,
radius <i>Double precision</i> [ , SRID <i>Integer</i>] ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>[<b>x y</b>] is assumed to be the center of a circle of given <b>radius</b>;
then a Geometry will be returned representing the MBR for this circle</td></tr>
<tr><td><b>Extent</b></td>
<td>Extent( geom <i>Geometry</i> ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>return a geometric object representing the bounding box that encloses a set of input values<br>
<b><u>aggregate function</u></b></td></tr>
<tr><td><b>ToGARS</b></td>
<td>ToGARS( geom <i>Geometry</i> ) : <i>String</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td><b>geom</b> is expected to represent a POINT (longitude and latitude coordinates);
the corresponding <a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=GARS">GARS</a> area designation code will be returned.<hr>
NULL will be returned if any error is encountered.</td></tr>
<tr><td><b>GARSMbr</b></td>
<td>GARSMbr( code <i>String</i> ) : <i>Geometry</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td><b>code</b> is assumed to represent a valid GARS area designation code;
a Geometry will be returned representing the MBR for the corresponding GARS area.<hr>
NULL will be returned if any error is encountered.</td></tr>
<tr><td><b>MbrMinX</b></td>
<td>MbrMinX( geom <i>Geometry</i>) : <i>Double precision</i><hr>
ST_MinX( geom <i>Geometry</i>) : <i>Double precision</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>return the x-coordinate for <i>geom</i> MBR's <u>leftmost side</u> as a double precision number.<hr>
NULL will be returned if <i>geom</i> isn't a valid Geometry.</td></tr>
<tr><td><b>MbrMinY</b></td>
<td>MbrMinY( geom <i>Geometry</i>) : <i>Double precision</i><hr>
ST_MinY( geom <i>Geometry</i>) : <i>Double precision</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>return the y-coordinate for <i>geom</i> MBR's <u>lowermost side</u> as a double precision number.<hr>
NULL will be returned if <i>geom</i> isn't a valid Geometry.</td></tr>
<tr><td><b>MbrMaxX</b></td>
<td>MbrMaxX( geom <i>Geometry</i>) : <i>Double precision</i><hr>
ST_MaxX( geom <i>Geometry</i>) : <i>Double precision</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>return the x-coordinate for <i>geom</i> MBR's <u>rightmost side</u> as a double precision number.<hr>
NULL will be returned if <i>geom</i> isn't a valid Geometry.</td></tr>
<tr><td><b>MbrMaxY</b></td>
<td>MbrMaxY( geom <i>Geometry</i>) : <i>Double precision</i><hr>
ST_MaxY( geom <i>Geometry</i>) : <i>Double precision</i></td>
<td></td>
<td align="center" bgcolor="#d0f0d0">base</td>
<td>return the y-coordinate for <i>geom</i> MBR's <u>uppermost side</u> as a double precision number.<hr>
NULL will be returned if <i>geom</i> isn't a valid Geometry.</td></tr>
<tr><td><b>MinZ</b></td>
<td>ST_MinZ( geom <i>Geometry</i>) : <i>Double precision</i><hr>