| 1 | GIS_TEST=# SELECT PostGIS_Full_Version(); |
|---|
| 2 | postgis_full_version |
|---|
| 3 | ------------------------------------------------------------------------------------- |
|---|
| 4 | POSTGIS="1.4.0" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS |
|---|
| 5 | (1 row) |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | GIS_TEST=# SELECT DropGeometryColumn( 'foo', 'the_geom'); |
|---|
| 9 | dropgeometrycolumn |
|---|
| 10 | ------------------------------------------ |
|---|
| 11 | public.foo.the_geom effectively removed. |
|---|
| 12 | (1 row) |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | GIS_TEST=# DROP TABLE foo; |
|---|
| 16 | DROP TABLE |
|---|
| 17 | GIS_TEST=# CREATE TABLE foo ()WITH (OIDS = TRUE); |
|---|
| 18 | CREATE TABLE |
|---|
| 19 | GIS_TEST=# SELECT AddGeometryColumn( 'foo', 'the_geom', -1, 'LINESTRING', 2); |
|---|
| 20 | addgeometrycolumn |
|---|
| 21 | ----------------------------------------------------- |
|---|
| 22 | public.foo.the_geom SRID:-1 TYPE:LINESTRING DIMS:2 |
|---|
| 23 | (1 row) |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | GIS_TEST=# INSERT INTO foo(the_geom) VALUES (ST_GeomFromText('LINESTRING(0 0, 1 3)')); |
|---|
| 27 | INSERT 1206561 1 |
|---|
| 28 | GIS_TEST=# |
|---|
| 29 | GIS_TEST=# select the_geom=ST_SetPoint(the_geom, 0, 'POINT(100000 200000)') from foo; |
|---|
| 30 | ?column? |
|---|
| 31 | ---------- |
|---|
| 32 | t |
|---|
| 33 | (1 row) |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | GIS_TEST=# select the_geom=ST_Translate(ST_SetPoint(the_geom, 0, 'POINT(100000 200000)'), 0, 0) from foo; |
|---|
| 37 | ?column? |
|---|
| 38 | ---------- |
|---|
| 39 | f |
|---|
| 40 | (1 row) |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | GIS_TEST=# |
|---|
| 44 | GIS_TEST=# select st_astext(the_geom), st_astext(ST_Envelope(ST_SetPoint(the_geom, 0, 'POINT(100000 200000)'))) from foo; |
|---|
| 45 | st_astext | st_astext |
|---|
| 46 | ---------------------+-------------------------------- |
|---|
| 47 | LINESTRING(0 0,1 3) | POLYGON((0 0,0 3,1 3,1 0,0 0)) |
|---|
| 48 | (1 row) |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | GIS_TEST=# select st_astext(the_geom), st_astext(ST_Envelope(ST_Translate(ST_SetPoint(the_geom, 0, 'POINT(100000 200000)'), 0, 0))) from foo; |
|---|
| 52 | st_astext | st_astext |
|---|
| 53 | ---------------------+---------------------------------------------------- |
|---|
| 54 | LINESTRING(0 0,1 3) | POLYGON((1 3,1 200000,100000 200000,100000 3,1 3)) |
|---|
| 55 | (1 row) |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | GIS_TEST=# |
|---|