forked from straup/postgis-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lwpostgis-8.3.sql
6537 lines (5477 loc) · 211 KB
/
lwpostgis-8.3.sql
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
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
-- $Id: lwpostgis.sql.in 3303 2008-11-20 10:10:11Z mcayland $
--
-- PostGIS - Spatial Types for PostgreSQL
-- http://postgis.refractions.net
-- Copyright 2001-2003 Refractions Research Inc.
--
-- This is free software; you can redistribute and/or modify it under
-- the terms of the GNU General Public Licence. See the COPYING file.
--
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
-- WARNING: Any change in this file must be evaluated for compatibility.
-- Changes cleanly handled by lwpostgis_uptrade.sql are fine,
-- other changes will require a bump in Major version.
-- Currently only function replaceble by CREATE OR REPLACE
-- are cleanly handled.
--
-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BEGIN;
-------------------------------------------------------------------
-- HISTOGRAM2D TYPE (lwhistogram2d)
-------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION histogram2d_in(cstring)
RETURNS histogram2d
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwhistogram2d_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_histogram2d_in(cstring)
RETURNS histogram2d
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwhistogram2d_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION histogram2d_out(histogram2d)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwhistogram2d_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_histogram2d_out(histogram2d)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwhistogram2d_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
CREATE TYPE histogram2d (
alignment = double,
internallength = variable,
input = ST_histogram2d_in,
output = ST_histogram2d_out,
storage = main
);
-------------------------------------------------------------------
-- SPHEROID TYPE
-------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION spheroid_in(cstring)
RETURNS spheroid
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','ellipsoid_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_spheroid_in(cstring)
RETURNS spheroid
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','ellipsoid_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION spheroid_out(spheroid)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','ellipsoid_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_spheroid_out(spheroid)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','ellipsoid_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
CREATE TYPE spheroid (
alignment = double,
internallength = 65,
input = ST_spheroid_in,
output = ST_spheroid_out
);
-------------------------------------------------------------------
-- GEOMETRY TYPE (lwgeom)
-------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_in(cstring)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_in(cstring)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_out(geometry)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_out(geometry)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_analyze(internal)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_analyze'
LANGUAGE 'C' VOLATILE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_analyze(internal)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_analyze'
LANGUAGE 'C' VOLATILE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_recv(internal)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_recv'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_recv(internal)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_recv'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_send(geometry)
RETURNS bytea
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_send'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_send(geometry)
RETURNS bytea
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','LWGEOM_send'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
CREATE TYPE geometry (
internallength = variable,
input = ST_geometry_in,
output = ST_geometry_out,
send = ST_geometry_send,
receive = ST_geometry_recv,
delimiter = ':',
analyze = ST_geometry_analyze,
storage = main
);
-------------------------------------------
-- Affine transforms
-------------------------------------------
-- Availability: 1.1.2
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_affine'
LANGUAGE 'C' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8,float8)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_affine'
LANGUAGE 'C' IMMUTABLE STRICT;
-- Availability: 1.1.2
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Affine(geometry,float8,float8,float8,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_Affine(geometry,float8,float8,float8,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, $2, $3, 0, $4, $5, 0, 0, 0, 1, $6, $7, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.2
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION RotateZ(geometry,float8)
RETURNS geometry
AS 'SELECT affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_RotateZ(geometry,float8)
RETURNS geometry
AS 'SELECT affine($1, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0, 1, 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.2
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Rotate(geometry,float8)
RETURNS geometry
AS 'SELECT rotateZ($1, $2)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_Rotate(geometry,float8)
RETURNS geometry
AS 'SELECT rotateZ($1, $2)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.2
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION RotateX(geometry,float8)
RETURNS geometry
AS 'SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_RotateX(geometry,float8)
RETURNS geometry
AS 'SELECT affine($1, 1, 0, 0, 0, cos($2), -sin($2), 0, sin($2), cos($2), 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.2
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION RotateY(geometry,float8)
RETURNS geometry
AS 'SELECT affine($1, cos($2), 0, sin($2), 0, 1, 0, -sin($2), 0, cos($2), 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_RotateY(geometry,float8)
RETURNS geometry
AS 'SELECT affine($1, cos($2), 0, sin($2), 0, 1, 0, -sin($2), 0, cos($2), 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, 1, 0, 0, 0, 1, 0, 0, 0, 1, $2, $3, $4)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Translate(geometry,float8,float8)
RETURNS geometry
AS 'SELECT translate($1, $2, $3, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_Translate(geometry,float8,float8)
RETURNS geometry
AS 'SELECT translate($1, $2, $3, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.0
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, $2, 0, 0, 0, $3, 0, 0, 0, $4, 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, $2, 0, 0, 0, $3, 0, 0, 0, $4, 0, 0, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.0
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION Scale(geometry,float8,float8)
RETURNS geometry
AS 'SELECT scale($1, $2, $3, 1)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_Scale(geometry,float8,float8)
RETURNS geometry
AS 'SELECT scale($1, $2, $3, 1)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.0
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION transscale(geometry,float8,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, $4, 0, 0, 0, $5, 0,
0, 0, 1, $2 * $4, $3 * $5, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_transscale(geometry,float8,float8,float8,float8)
RETURNS geometry
AS 'SELECT affine($1, $4, 0, 0, 0, $5, 0,
0, 0, 1, $2 * $4, $3 * $5, 0)'
LANGUAGE 'SQL' IMMUTABLE STRICT;
-- Availability: 1.1.0
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION shift_longitude(geometry)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_longitude_shift'
LANGUAGE 'C' IMMUTABLE STRICT;
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_shift_longitude(geometry)
RETURNS geometry
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_longitude_shift'
LANGUAGE 'C' IMMUTABLE STRICT;
-------------------------------------------------------------------
-- BOX3D TYPE
-------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box3d_in(cstring)
RETURNS box3d
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX3D_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box3d_out(box3d)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX3D_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box3d_in(cstring)
RETURNS box3d
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX3D_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box3d_out(box3d)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX3D_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
CREATE TYPE box3d (
alignment = double,
internallength = 48,
input = ST_box3d_in,
output = ST_box3d_out
);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION xmin(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_xmin'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_XMin(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_xmin'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION ymin(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_ymin'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_YMin(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_ymin'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION zmin(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_zmin'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_ZMin(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_zmin'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION xmax(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_xmax'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_XMax(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_xmax'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION ymax(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_ymax'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_YMax(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_ymax'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION zmax(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_zmax'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_ZMax(box3d)
RETURNS FLOAT8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX3D_zmax'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-------------------------------------------------------------------
-- CHIP TYPE
-------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION chip_in(cstring)
RETURNS chip
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','CHIP_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_chip_in(cstring)
RETURNS chip
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','CHIP_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION chip_out(chip)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','CHIP_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_chip_out(chip)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','CHIP_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
CREATE TYPE chip (
alignment = double,
internallength = variable,
input = ST_chip_in,
output = ST_chip_out,
storage = extended
);
-----------------------------------------------------------------------
-- BOX2D
-----------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_in(cstring)
RETURNS box2d
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX2DFLOAT4_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_in(cstring)
RETURNS box2d
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX2DFLOAT4_in'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_out(box2d)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX2DFLOAT4_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_out(box2d)
RETURNS cstring
AS '/usr/lib/postgresql/8.3/lib/liblwgeom','BOX2DFLOAT4_out'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
CREATE TYPE box2d (
internallength = 16,
input = ST_box2d_in,
output = ST_box2d_out,
storage = plain
);
---- BOX2D support functions
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_overleft(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_overleft'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_overleft(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_overleft'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_overright(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_overright'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_overright(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_overright'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_left(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_left'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_left(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_left'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_right(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_right'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_right(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_right'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_contain(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_contain'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_contain(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_contain'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_contained(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_contained'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_contained(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_contained'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_overlap(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_overlap'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_overlap(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_overlap'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_same(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_same'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_same(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_same'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION box2d_intersects(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_intersects'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_box2d_intersects(box2d, box2d)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'BOX2D_intersects'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- lwgeom operator support functions
-------------------------------------------------------------------
-- BTREE indexes
-------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_lt(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_lt'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_lt(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_lt'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_le(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_le'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_le(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_le'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_gt(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_gt'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_gt(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_gt'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_ge(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_ge'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_ge(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_ge'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_eq(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_eq'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_eq(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_eq'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_cmp(geometry, geometry)
RETURNS integer
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_cmp'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_cmp(geometry, geometry)
RETURNS integer
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'lwgeom_cmp'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict);
--
-- Sorting operators for Btree
--
CREATE OPERATOR < (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = ST_geometry_lt,
COMMUTATOR = '>', NEGATOR = '>=',
RESTRICT = contsel, JOIN = contjoinsel
);
CREATE OPERATOR <= (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = ST_geometry_le,
COMMUTATOR = '>=', NEGATOR = '>',
RESTRICT = contsel, JOIN = contjoinsel
);
CREATE OPERATOR = (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = ST_geometry_eq,
COMMUTATOR = '=', -- we might implement a faster negator here
RESTRICT = contsel, JOIN = contjoinsel
);
CREATE OPERATOR >= (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = ST_geometry_ge,
COMMUTATOR = '<=', NEGATOR = '<',
RESTRICT = contsel, JOIN = contjoinsel
);
CREATE OPERATOR > (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = ST_geometry_gt,
COMMUTATOR = '<', NEGATOR = '<=',
RESTRICT = contsel, JOIN = contjoinsel
);
CREATE OPERATOR CLASS btree_geometry_ops
DEFAULT FOR TYPE geometry USING btree AS
OPERATOR 1 < ,
OPERATOR 2 <= ,
OPERATOR 3 = ,
OPERATOR 4 >= ,
OPERATOR 5 > ,
FUNCTION 1 geometry_cmp (geometry, geometry);
-------------------------------------------------------------------
-- GiST indexes
-------------------------------------------------------------------
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION postgis_gist_sel (internal, oid, internal, int4)
RETURNS float8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_gist_sel'
LANGUAGE 'C';
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_postgis_gist_sel (internal, oid, internal, int4)
RETURNS float8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_gist_sel'
LANGUAGE 'C';
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION postgis_gist_joinsel(internal, oid, internal, smallint)
RETURNS float8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_gist_joinsel'
LANGUAGE 'C';
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_postgis_gist_joinsel(internal, oid, internal, smallint)
RETURNS float8
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_gist_joinsel'
LANGUAGE 'C';
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_overleft(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overleft'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_overleft(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overleft'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_overright(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overright'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_overright(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overright'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_overabove(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overabove'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_overabove(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overabove'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_overbelow(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overbelow'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_overbelow(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overbelow'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_left(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_left'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_left(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_left'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_right(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_right'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_right(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_right'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_above(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_above'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_above(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_above'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_below(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_below'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_below(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_below'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_contain(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_contain'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_contain(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_contain'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_contained(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_contained'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_contained(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_contained'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_overlap(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overlap'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_overlap(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_overlap'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- Deprecation in 1.2.3
CREATE OR REPLACE FUNCTION geometry_same(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_same'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
--Availability: 1.2.2
CREATE OR REPLACE FUNCTION ST_geometry_same(geometry, geometry)
RETURNS bool
AS '/usr/lib/postgresql/8.3/lib/liblwgeom', 'LWGEOM_same'
LANGUAGE 'C' IMMUTABLE STRICT; -- WITH (isstrict,iscachable);
-- GEOMETRY operators
CREATE OPERATOR << (
LEFTARG = geometry, RIGHTARG = geometry, PROCEDURE = ST_geometry_left,
COMMUTATOR = '>>',
RESTRICT = positionsel, JOIN = positionjoinsel
);