text: set current_schema=postgis;
  SELECT (g.gdump).path, ST_AsEWKT((g.gdump).geom) as wkt
  FROM
  (SELECT
  ST_DumpPoints(ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 
  0)),
  ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
  ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
  ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )') ) AS gdump
  ) AS g;
  SELECT Box2D(ST_GeomFromText('LINESTRING(1 2, 3 4, 5 6)'));
  SELECT Box2D(ST_GeomFromText('CIRCULARSTRING(220268 150415,220227 150505,220227 150406)') 
  );
  select '114', ST_perimeter2d('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value;
  select  ST_GeogFromText('POINT(-69.83262 43.43636)') ;
  select  ST_GeogFromText('SRID=4326;POINT(-11.1111111 40)');
  SELECT ST_AsText(ST_SnapToGrid(
  ST_GeomFromText('LINESTRING(1.1115678 2.123, 4.111111 3.2374897, 4.11112 3.23748667) 
  '),
  0.001)
  );
  SELECT ST_AsEWKT(ST_SnapToGrid(
  ST_GeomFromEWKT('LINESTRING(-1.1115678 2.123 2.3456 1.11111,
  4.111111 3.2374897 3.1234 1.1111, -1.11111112 2.123 2.3456 1.1111112)'),
  ST_GeomFromEWKT('POINT(1.12 2.22 3.2 4.4444)'),
  0.1, 0.1, 0.1, 0.01) );
  SELECT ST_AsEWKT(ST_SnapToGrid(ST_GeomFromEWKT('LINESTRING(-1.1115678 2.123 3 2.3456,
  4.111111 3.2374897 3.1234 1.1111)'),
  0.01) );
  
  SELECT ST_Length_Spheroid( the_geom, sph_m ) As tot_len,
  ST_Length_Spheroid(ST_GeometryN(the_geom,1), sph_m) As len_line1,
  ST_Length_Spheroid(ST_GeometryN(the_geom,2), sph_m) As len_line2
  FROM (SELECT ST_GeomFromText('MULTILINESTRING((-118.584 38.374,-118.583 38.5),
  (-71.05957 42.3589 , -71.061 43))') As the_geom,
  CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m) as foo;
  
  SELECT ST_Length_Spheroid( the_geom, sph_m ) As tot_len,
  ST_Length_Spheroid(ST_GeometryN(the_geom,1), sph_m) As len_line1,
  ST_Length_Spheroid(ST_GeometryN(the_geom,2), sph_m) As len_line2
  FROM (SELECT ST_GeomFromEWKT('MULTILINESTRING((-118.584 38.374 20,-118.583 38.5 30) 
  ,
  (-71.05957 42.3589 75, -71.061 43 90))') As the_geom,
  CAST('SPHEROID["GRS_1980",6378137,298.257222101]' As spheroid) As sph_m) as foo;
  SELECT ST_AsText(ST_ClosestPoint(pt,line) 
  ) AS cp_pt_line,
  ST_AsText(ST_ClosestPoint(line,pt 
  )) As cp_line_pt
  FROM (SELECT 'POINT(100 100)'::geometry 
  As pt,
  'LINESTRING (20 80, 98 
  190, 110 180, 50 75 )'::geometry As line
  ) As foo;
  
  SELECT ST_DFullyWithin(geom_a, geom_b, 10) as DFullyWithin10, ST_DWithin(geom_a, 
  geom_b, 10) as DWithin10, ST_DFullyWithin(geom_a, geom_b, 20) as DFullyWithin20 from
  (select ST_GeomFromText('POINT(1 1)') as geom_a,ST_GeomFromText('LINESTRING(1 5, 2 7, 1 
  9, 14 12)') as geom_b) t1;
  SELECT '#146', ST_Distance(g1,g2), ST_Dwithin(g1,g2,0.01), ST_AsEWKT(g2) FROM (SELECT ST_geomFromEWKT('LINESTRING(1 2, 2 4)') As g1, ST_Collect(ST_GeomFromEWKT('LINESTRING(0 0, -1 -1)'), ST_GeomFromEWKT('MULTIPOINT(1 2,2 3)')) As g2) As foo;
   
  SELECT '#657.3',ST_DWithin(ST_Project('POINT(10 10)'::geography, 2000, pi()/2), 'POINT(10 10)'::geography, 2000);
  SELECT '#1264', ST_DWithin('POLYGON((-10 -10, -10 10, 10 10, 10 -10, -10 -10))'::geography, 'POINT(0 0)'::geography, 0);
  SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
  
  SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry);
  
  SELECT ST_Intersects(
  ST_GeographyFromText('SRID=4326;LINESTRING(-43.23456 72.4567,-43.23456 72.4568)'),
  ST_GeographyFromText('SRID=4326;POINT(-43.23456 72.4567772)')
  );
  
  SELECT ST_AsEWKT(ST_Affine(the_geom, cos(pi()), -sin(pi()), 0, sin(pi()), cos(pi()), 0, 
  0, 0, 1, 0, 0, 0)) As using_affine,
  ST_AsEWKT(ST_Rotate(the_geom, pi())) As using_rotate
  FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 1 4 3)') As the_geom) As foo;
  select '#1023.b', postgis_addbbox('POINT(10 4)'::geometry) = 'POINT(10 4)'::geometry;
  SELECT 'T1B', ST_Summary(postgis_addbbox('POINT(0 0)'::geometry));
  SELECT 'T1ZMB', ST_Summary(postgis_addbbox('POINT(0 0 0 0)'::geometry));
  SELECT ST_Length2D(ST_GeomFromText('LINESTRING(743238 2967416,743238 2967450,743265 2967450,
  743265.625 2967416,743238 2967416)',2249));
  SELECT ST_AsText(ST_Centroid('MULTIPOINT ( -1 0, -1 2, -1 3, -1 4, -1 7, 0 1, 0 3, 1 1, 2 
  0, 6 0, 7 8, 9 8, 10 6 )'));
  
  SELECT ST_PolygonFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 
  42.3903701743239,
  -71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 
  42.3902909739571))');
  
  SELECT ST_PolygonFromText('POINT(1 2)') IS NULL as point_is_notpoly;
  SELECT ST_AsEWKT(ST_Force3D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 
  5 6 2)')));
  SELECT ST_AsEWKT(ST_Force3D('POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))'));
  SELECT ST_Npoints(the_geom) As np_before, ST_NPoints(ST_Simplify(the_geom,0.1)) As 
  np01_notbadcircle, ST_NPoints(ST_Simplify(the_geom,0.5)) As np05_notquitecircle,
  ST_NPoints(ST_Simplify(the_geom,1)) As np1_octagon, ST_NPoints(ST_Simplify(the_geom,10)) As 
  np10_triangle,
  (ST_Simplify(the_geom,100) is null) As np100_geometrygoesaway
  FROM (SELECT ST_Buffer('POINT(1 3)', 10,12) As the_geom) As foo;
  
  SELECT ST_AsText(ST_Union(ST_GeomFromText('POINT(1 2)'),
  ST_GeomFromText('POINT(-2 3)') ) );
  SELECT ST_AsText(ST_Union(ST_GeomFromText('POINT(1 2)'),
  ST_GeomFromText('POINT(1 2)') ) );
  
  SELECT ST_AsEWKT(st_union(the_geom))
  FROM
  (SELECT ST_GeomFromEWKT('POLYGON((-7 4.2,-7.1 4.2,-7.1 4.3,
  -7 4.2))') as the_geom
  UNION ALL
  SELECT ST_GeomFromEWKT('POINT(5 5 5)') as the_geom
  UNION ALL
  SELECT ST_GeomFromEWKT('POINT(-2 3 1)') as the_geom
  UNION ALL
  SELECT ST_GeomFromEWKT('LINESTRING(5 5 5, 10 10 10)') as the_geom ) as foo;
  
  SELECT ST_AsText(ST_Union(ARRAY[ST_GeomFromText('LINESTRING(1 2, 3 4)'),
  ST_GeomFromText('LINESTRING(3 4, 4 5)')])) As wktunion;
  SELECT ST_AsText(ST_CollectionExtract(ST_GeomFromText('GEOMETRYCOLLECTION( 
  GEOMETRYCOLLECTION(POINT(0 0)))'),1));
  SELECT ST_AsText(ST_CollectionExtract(ST_GeomFromText('GEOMETRYCOLLECTION( 
  GEOMETRYCOLLECTION(LINESTRING(0 0, 1 1)),LINESTRING(2 2, 3 3))'),2));
  SELECT ST_AsEWKT(ST_PatchN(geom, 2)) As geomewkt
  FROM (
  VALUES (ST_GeomFromEWKT('POLYHEDRALSURFACE( ((0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0)),
  ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)),
  ((1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0)),
  ((0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)) )')) ) As 
  foo(geom);
  SELECT
  ST_AsText(
  ST_PointFromWKB(
  ST_AsEWKB('POINT(2 5)'::geometry)
  )
  );
  SELECT ST_3DMakeBox(ST_MakePoint(-989502.1875, 528439.5625, 10),
  ST_MakePoint(-987121.375 ,529933.1875, 10)) As abb3d;
  SELECT ST_AsEWKT(ST_Force2D(ST_GeomFromEWKT('CIRCULARSTRING(1 1 2, 2 3 2, 4 5 2, 6 7 2, 5 6 
  2)')));
  SELECT ST_AsEWKT(ST_Force2D('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2)) 
  '));
  SELECT tbl1.column1, tbl2.column1, tbl1.column2 ~ tbl2.column2 AS contains
  FROM
  ( VALUES
  (1, 'LINESTRING (0 0, 3 3)'::geometry)) AS tbl1,
  ( VALUES
  (2, 'LINESTRING (0 0, 4 4)'::geometry),
  (3, 'LINESTRING (1 1, 2 2)'::geometry),
  (4, 'LINESTRING (0 0, 3 3)'::geometry)) AS tbl2;
  SELECT ST_AsGML(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
  SELECT ST_AsGML(3, ST_GeomFromText('POINT(5.234234233242 6.34534534534)',4326), 5, 17);
  SELECT ST_AsGML(3, ST_GeomFromText('LINESTRING(1 2, 3 4, 10 20)',4326), 5, 32);
  SELECT ST_AsGML(3, ST_GeomFromText('LINESTRING(1 2, 3 4, 10 20)',4326), 5, 49);
  SELECT ST_AsText(
  ST_LongestLine('POINT(100 100)':: 
  geometry,
  'LINESTRING (20 80, 98 
  190, 110 180, 50 75 )'::geometry)
  ) As lline;
  
  SELECT ST_AsText(
  ST_LongestLine(
  ST_GeomFromText('POLYGON 
  ((175 150, 20 40,
  50 60, 125 100, 
  175 150))'),
  ST_Buffer(ST_GeomFromText 
  ('POINT(110 170)'), 20)
  )
  ) As llinewkt;
  
  SELECT ST_AsText(ST_LongestLine(c.the_geom, c.the_geom)) As llinewkt,
  ST_MaxDistance(c.the_geom,c.the_geom) As max_dist,
  ST_Length(ST_LongestLine(c.the_geom, c.the_geom)) As lenll
  FROM (SELECT ST_BuildArea(ST_Collect(the_geom)) As the_geom
  FROM (SELECT ST_Translate(ST_SnapToGrid(ST_Buffer(ST_Point(50 ,generate_series 
  (50,190, 50)
  ),40, 'quad_segs=2'),1), x, 0) As the_geom
  FROM generate_series(1,100,50) As x) AS foo
  ) As c;
  SELECT ST_AsEWKT(ST_LocateBetweenElevations(
  ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6)'),2,4)) As ewelev;
  SELECT ST_AsEWKT(ST_LocateBetweenElevations(
  ST_GeomFromEWKT('LINESTRING(1 2 6, 4 5 -1, 7 8 9)'),6,9)) As ewelev;
  SELECT ST_AsEWKT((ST_Dump(the_geom)).geom)
  FROM
  (SELECT ST_LocateBetweenElevations(
  ST_GeomFromEWKT('LINESTRING(1 2 6, 4 5 -1, 7 8 9)'),6,9) As the_geom) As foo;
  SELECT ST_LineFromText('LINESTRING(1 2, 3 4)') AS aline, ST_LineFromText('POINT(1 2)') AS 
  null_return;
  SELECT ST_astext(ST_GeomFromEWKB(E'\\001\\002\\000\\000 \\255\\020\\000\\000\\003\\000\\000\\000\\344J=\\013B\\312Q\\300n\\303(\\010\\036!E@''\\277E''K\\312Q\\300\\366{b\\235*!E@\\225|\\354.P\\312Q\\300p\\231\\323e1!E@'));
  SELECT Box3D(ST_GeomFromEWKT('LINESTRING(1 2 3, 3 4 5, 5 6 5)'));
  SELECT Box3D(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 1,220227 
  150406 1)'));
  SELECT tbl1.column1, tbl2.column1, tbl1.column2 &> tbl2.column2 AS overright
  FROM
  ( VALUES
  (1, 'LINESTRING(1 2, 4 6)'::geometry)) AS tbl1,
  ( VALUES
  (2, 'LINESTRING(0 0, 3 3)'::geometry),
  (3, 'LINESTRING(0 1, 0 5)'::geometry),
  (4, 'LINESTRING(6 0, 6 1)'::geometry)) AS tbl2;
  SELECT ST_AsEWKT(ST_LineFromMultiPoint(ST_GeomFromEWKT('MULTIPOINT(1 2 3, 4 5 6, 7 8 9)')));
  SELECT ST_AsText(ST_GeomFromGeoHash('9qqj7nmxncgyy4d0dbxqz0'));
  SELECT ST_AsText(ST_GeomFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 4));
  SELECT ST_AsText(ST_GeomFromGeoHash('9qqj7nmxncgyy4d0dbxqz0', 10));
  SELECT ST_AsEWKT(ST_RotateX(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), pi()/2));
  SELECT ST_AsEWKT(ST_Shift_Longitude(ST_GeomFromEWKT('SRID=4326;POINT(-118.58 38.38 10)'))) 
  As geomA,
  ST_AsEWKT(ST_Shift_Longitude(ST_GeomFromEWKT('SRID=4326;POINT(241.42 38.38 10)'))) As 
  geomb;
  
  SELECT ST_AsText(ST_Shift_Longitude(ST_GeomFromText('LINESTRING(-118.58 38.38, -118.20 
  38.45)')));
  
  SELECT ST_Within(smallc,smallc) As smallinsmall,
  ST_Within(smallc, bigc) As smallinbig,
  ST_Within(bigc,smallc) As biginsmall,
  ST_Within(ST_Union(smallc, bigc), bigc) as unioninbig,
  ST_Within(bigc, ST_Union(smallc, bigc)) as biginunion,
  ST_Equals(bigc, ST_Union(smallc, bigc)) as bigisunion
  FROM
  (
  SELECT ST_Buffer(ST_GeomFromText('POINT(50 50)'), 20) As smallc,
  ST_Buffer(ST_GeomFromText('POINT(50 50)'), 40) As bigc) As foo;
  
  SELECT ST_MPolyFromText('MULTIPOLYGON(((0 0 1,20 0 1,20 20 1,0 20 1,0 0 1),(5 5 3,5 7 3,7 7 
  3,7 5 3,5 5 3)))');
  
  SELECT
  ST_AsText(
  ST_WKBToSQL(
  ST_AsEWKB('POINT(2 5)'::geometry)
  )
  );
  SELECT ST_SRID(ST_GeomFromText('POINT(-71.1043 42.315)',4326));
  SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)'));
  SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D\textdegree{}M''S.SSS"C'));
  SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D\textdegree{}M''S.SSS"'));
  SELECT (ST_AsLatLonText('POINT (-3.2342342 -2.32498)', 'D.DDDD degrees C'));
  SELECT (ST_AsLatLonText('POINT (-302.2342342 -792.32498)'));
  SELECT ST_LineFromWKB(ST_AsBinary(ST_GeomFromText('LINESTRING(1 2, 3 4)'))) AS aline,
  ST_LineFromWKB(ST_AsBinary(ST_GeomFromText('POINT(1 2)'))) IS NULL AS null_return;
  SELECT ST_M(ST_GeomFromEWKT('POINT(1 2 3 4)'));
  SELECT ST_MaxDistance('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry 
  );
  
  SELECT ST_MaxDistance('POINT(0 0)'::geometry, 'LINESTRING ( 2 2, 2 2 )'::geometry 
  );
  SELECT ST_Length(ST_GeomFromText('LINESTRING(743238 2967416,743238 2967450,743265 2967450,
  743265.625 2967416,743238 2967416)',2249));
  
  SELECT ST_Length(
  ST_Transform(
  ST_GeomFromEWKT('SRID=4326;LINESTRING(-72.1260 42.45, -72.1240 42.45666, -72.123 
  42.1546)'),
  26986
  )
  );
  SELECT ST_AsText(ST_CollectionHomogenize('GEOMETRYCOLLECTION(POINT(0 0))'));
  SELECT ST_AsText(ST_CollectionHomogenize('GEOMETRYCOLLECTION(POINT(0 0),POINT(1 1))'));
  SELECT st_HausdorffDistance(
  'LINESTRING (0 0, 2 0)'::geometry,
  'MULTIPOINT (0 1, 1 0, 2 1)'::geometry);
  
  SELECT st_hausdorffdistance('LINESTRING (130 0, 0 0, 0 150)'::geometry, ' 
  LINESTRING (10 10, 10 150, 130 10)'::geometry, 0.5);
  SELECT tbl1.column1, tbl2.column1, tbl1.column2 << tbl2.column2 AS left
  FROM
  ( VALUES
  (1, 'LINESTRING (1 2, 1 5)'::geometry)) AS tbl1,
  ( VALUES
  (2, 'LINESTRING (0 0, 4 3)'::geometry),
  (3, 'LINESTRING (6 0, 6 5)'::geometry),
  (4, 'LINESTRING (2 2, 5 6)'::geometry)) AS tbl2;
  SELECT ST_AsText(
  ST_SymDifference(
  ST_GeomFromText('LINESTRING(50 100, 50 200)'),
  ST_GeomFromText('LINESTRING(50 50, 50 150)'))
  );
  
  SELECT ST_AsEWKT(ST_SymDifference(ST_GeomFromEWKT('LINESTRING(1 2 1, 1 4 2)'),
  ST_GeomFromEWKT('LINESTRING(1 1 3, 1 3 4)')));
  SELECT ST_BdPolyFromText('MULTILINESTRING((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 2 4, 4 4, 4 2, 2 2),(5 5, 5 7, 7 7, 7 5, 5 5))', 3);
  
  SELECT ST_BdMPolyFromText('MULTILINESTRING( (0 0, 10 0, 10 10, 0 10, 0 0), (2 2, 2 4, 4 4, 4 2, 2 2), (5 5, 5 7, 7 7, 7 5, 5 5), (20 0,30 0,30 10,20 10,20 0), (22 2,22 4,24 4,24 2,22 2), (25 5,25 7,27 7,27 5,25 5))', 3);
  
  select ST_BdPolyFromText('POINT(0 0)', 3);
  select ST_BdMPolyFromText('POINT(0 0)', 3);
  
  -- MultiPolygon forming input to BdPolyFromText
  select ST_BdPolyFromText('MULTILINESTRING( (0 0, 10 0, 10 10, 0 10, 0 0), (2 2, 2 4, 4 4, 4 2, 2 2), (5 5, 5 7, 7 7, 7 5, 5 5), (20 0,30 0,30 10,20 10,20 0), (22 2,22 4,24 4,24 2,22 2), (25 5,25 7,27 7,27 5,25 5))', 3);
  
  -- SinglePolygon forming input to BdMPolyFromText
  select 'BdMPolyFromText', ST_asewkt(ST_BdMPolyFromText('MULTILINESTRING((0 0, 10 0, 10 10, 0 10, 0 0),(2 2, 2 4, 4 4, 4 2, 2 2),(5 5, 5 7, 7 7, 7 5, 5 5))', 3));
  SELECT ST_GeographyFromText('LINESTRING(38.769917 10.780694, 38.769917 9.106194)');
  SELECT ST_GeographyFromText('SRID=4326;POLYGON((-119.5434 34.9438,-119.5437 34.9445,-119.5452 34.9442,-119.5434 34.9438))') ;
  SELECT ST_AsText(ST_Multi(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
  743265 2967450,743265.625 2967416,743238 2967416))')));
  select '111', ST_MemSize(PostGIS_DropBBOX('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY)) as value;
  
  select '222', PostGIS_DropBBOX('MULTIPOLYGON( ((0 0, 10 0, 10 10, 0 10, 0 0)),( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7 , 5 7, 5 5) ) ,( (0 0, 10 0, 10 10, 0 10, 0 0),(5 5, 7 5, 7 7, 5 7, 5 5),(1 1,2 1, 2 2, 1 2, 1 1) ) )'::GEOMETRY) as value;
  SELECT ST_AsText(ST_Translate(ST_GeomFromText('POINT(-71.01 42.37)',4326),1,0)) As 
  wgs_transgeomtxt;
  
  SELECT ST_AsText(ST_Translate(ST_GeomFromText('LINESTRING(-71.01 42.37,-71.11 42.38)',4326) 
  ,1,0.5)) As wgs_transgeomtxt;
  
  SELECT ST_AsEWKT(ST_Translate(CAST('POINT(0 0 0)' As geometry), 5, 12,3));
  
  SELECT ST_AsText(ST_Translate(ST_Collect('CURVEPOLYGON(CIRCULARSTRING(4 3,3.12 0.878,1 
  0,-1.121 5.1213,6 7, 8 9,4 3))','POINT(1 3)'),1,2));
  SELECT ST_Z(ST_GeomFromEWKT('POINT(1 2 3 4)'));
  SELECT * FROM ST_IsValidDetail('LINESTRING(220227 150406,2220227 150407,222020 150410)');
  
  
  SELECT ST_ZMax('BOX3D(1 2 3, 4 5 6)');
  SELECT ST_ZMax(ST_GeomFromEWKT('LINESTRING(1 3 4, 5 6 7)'));
  SELECT ST_ZMax(ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 
  150406 3)'));
  SELECT ST_Overlaps(a,b) As a_overlap_b,
  ST_Crosses(a,b) As a_crosses_b,
  ST_Intersects(a, b) As a_intersects_b, ST_Contains(b,a) As b_contains_a
  FROM (SELECT ST_GeomFromText('POINT(1 0.5)') As a, ST_GeomFromText('LINESTRING(1 0, 1 1, 3 
  5)') As b)
  As foo;
  
  SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b,
  ST_Intersects(a, b) As a_intersects_b,
  ST_Contains(a,b) As a_contains_b
  FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3) As a, ST_GeomFromText(' 
  LINESTRING(1 0, 1 1, 3 5)') As b)
  As foo;
  
  SELECT ST_Overlaps(a,b) As a_overlap_b, ST_Crosses(a,b) As a_crosses_b, ST_Intersects(a, b) 
  As a_intersects_b,
  ST_Contains(b,a) As b_contains_a,
  ST_Dimension(a) As dim_a, ST_Dimension(b) as dim_b, ST_Dimension(ST_Intersection(a,b)) As 
  dima_intersection_b
  FROM (SELECT ST_Buffer(ST_GeomFromText('POINT(1 0.5)'), 3) As a,
  ST_Buffer(ST_GeomFromText('LINESTRING(1 0, 1 1, 3 5)'),0.5) As b)
  As foo;
  SELECT ST_AsEWKB(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326));
  SELECT ST_AsEWKB(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326), 'XDR');
  SELECT ST_Summary(ST_GeomFromText('LINESTRING(0 0, 1 1)')) as geom,
  ST_Summary(ST_GeogFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))')) geog;
  SELECT ST_Summary(ST_GeogFromText('LINESTRING(0 0 1, 1 1 1)')) As geog_line,
  ST_Summary(ST_GeomFromText('SRID=4326;POLYGON((0 0 1, 1 1 2, 1 2 3, 1 1 1, 0 0 1)) 
  ')) As geom_poly;
  
  SELECT ST_Summary(ST_GeogFromText('LINESTRING(0 0 1, 1 1 1)')) As geog_line,
  ST_Summary(ST_GeomFromText('SRID=4326;POLYGON((0 0 1, 1 1 2, 1 2 3, 1 1 1, 0 0 1)) 
  ')) As geom_poly;
  SELECT ST_AsEWKT(ST_LineInterpolatePoint(the_line, 0.20))
  FROM (SELECT ST_GeomFromEWKT('LINESTRING(25 50, 100 125, 150 190)') as the_line) As foo;
  
  SELECT ST_AsEWKT(ST_LineInterpolatePoint(the_line, 0.5))
  FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6, 6 7 8)') as the_line) As foo;
  
  SELECT ST_AsText(ST_LineInterpolatePoint(foo.the_line, ST_LineLocatePoint(foo.the_line, 
  ST_GeomFromText('POINT(4 3)'))))
  FROM (SELECT ST_GeomFromText('LINESTRING(1 2, 4 5, 6 7)') As the_line) As foo;
  
  SELECT ST_AsEWKT(ST_3DClosestPoint(line,pt)) AS cp3d_line_pt,
  ST_AsEWKT(ST_ClosestPoint(line,pt)) As cp2d_line_pt
  FROM (SELECT 'POINT(100 100 30)'::geometry As pt,
  'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 1000)':: 
  geometry As line
  ) As foo;
  
  
  SELECT ST_AsEWKT(ST_3DClosestPoint(line,pt)) AS cp3d_line_pt,
  ST_AsEWKT(ST_ClosestPoint(line,pt)) As cp2d_line_pt
  FROM (SELECT 'MULTIPOINT(100 100 30, 50 74 1000)'::geometry As pt,
  'LINESTRING (20 80 20, 98 190 1, 110 180 3, 50 75 900)':: 
  geometry As line
  ) As foo;
  
  SELECT ST_AsEWKT(ST_3DClosestPoint(poly, mline)) As cp3d,
  ST_AsEWKT(ST_ClosestPoint(poly, mline)) As cp2d
  FROM (SELECT ST_GeomFromEWKT('POLYGON((175 150 5, 20 40 5, 35 45 5, 50 60 5, 
  100 100 5, 175 150 5))') As poly,
  ST_GeomFromEWKT('MULTILINESTRING((175 155 2, 20 40 20, 50 60 -2, 125 
  100 1, 175 155 1),
  (1 10 2, 5 20 1))') As mline ) As foo;
  
  SELECT
  ST_DelaunayTriangles(
  ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40,
  50 60, 125 100, 175 150))'),
  ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
  ))
  As dtriag;
  
  SELECT
  ST_DelaunayTriangles(
  ST_Union(ST_GeomFromText('POLYGON((175 150, 20 40,
  50 60, 125 100, 175 150))'),
  ST_Buffer(ST_GeomFromText('POINT(110 170)'), 20)
  ),0.001,1)
  As dtriag;
  
  SELECT ST_AsText(ST_DelaunayTriangles(ST_GeomFromText(
  'MULTIPOINT Z(14 14 10,
  150 14 100,34 6 25, 20 10 150)'))) As wkt;
  
  SELECT ST_MLineFromText('MULTILINESTRING((1 2, 3 4), (4 5, 6 7))');
  SELECT tbl1.column1, tbl2.column1, tbl1.column2 |>> tbl2.column2 AS above
  FROM
  ( VALUES
  (1, 'LINESTRING (1 4, 1 7)'::geometry)) AS tbl1,
  ( VALUES
  (2, 'LINESTRING (0 0, 4 2)'::geometry),
  (3, 'LINESTRING (6 1, 6 5)'::geometry),
  (4, 'LINESTRING (2 3, 5 6)'::geometry)) AS tbl2;
  SELECT ST_AsGeoJSON(the_geom) from fe_edges limit 1;
  SELECT ST_AsGeoJSON('LINESTRING(1 2 3, 4 5 6)');
  SELECT ST_AsText(
  ST_Difference(
  ST_GeomFromText('LINESTRING(50 100, 50 200)'),
  ST_GeomFromText('LINESTRING(50 50, 50 150)')
  )
  );
  