Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the_geom by geom #1303

Draft
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/dev/CSVRead.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ file is interpreted as the column names.
CREATE TABLE AREA AS
SELECT * FROM CSVRead('/home/user/area.csv') LIMIT 2;
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- | ---------------------------------------- | ------ |
-- | POLYGON((-10 109, 90 9, -10 9, -10 109)) | 1 |
-- | POLYGON((90 109, 190 9, 90 9, 90 109)) | 2 |
Expand All @@ -56,7 +56,7 @@ CREATE TABLE AREA AS
NULL,
'fieldSeparator=;') LIMIT 2;
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- | ---------------------------------------- | ------ |
-- | POLYGON((-10 109, 90 9, -10 9, -10 109)) | 1 |
-- | POLYGON((90 109, 190 9, 90 9, 90 109)) | 2 |
Expand Down Expand Up @@ -88,13 +88,13 @@ CREATE TABLE AREA AS
| 3 | 6 | 7 |

CREATE TABLE POINTS(ID INT PRIMARY KEY,
THE_GEOM GEOMETRY) AS
SELECT ST_MakePoint(coord_x, coord_y) THE_GEOM, id
GEOM GEOMETRY) AS
SELECT ST_MakePoint(coord_x, coord_y) GEOM, id
FROM CSVREAD('/home/user/centroid.csv');

SELECT * FROM POINTS;
-- Answer:
| ID | THE_GEOM |
| ID | GEOM |
|----|------------|
| 1 | POINT(2 3) |
| 2 | POINT(4 5) |
Expand Down
6 changes: 3 additions & 3 deletions docs/dev/CSVWrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ the CSV file specified by `path`.

{% highlight mysql %}
-- Create an example table to use with CSVWrite:
CREATE TABLE AREA(THE_GEOM VARCHAR(100), ID INT PRIMARY KEY);
CREATE TABLE AREA(GEOM VARCHAR(100), ID INT PRIMARY KEY);
INSERT INTO AREA VALUES
('POLYGON((-10 109, 90 9, -10 9, -10 109))', 1),
('POLYGON((90 109, 190 9, 90 9, 90 109))', 2);
Expand All @@ -44,7 +44,7 @@ CALL CSVWrite('/home/user/area.csv', 'SELECT * FROM AREA');
-- Read it back:
SELECT * FROM CSVRead('/home/user/area.csv');
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- | ---------------------------------------- | ------ |
-- | POLYGON((-10 109, 90 9, -10 9, -10 109)) | 1 |
-- | POLYGON((90 109, 190 9, 90 9, 90 109)) | 2 |
Expand All @@ -58,7 +58,7 @@ SELECT * FROM CSVRead('/home/user/area.csv',
NULL,
'charset=UTF-8 fieldSeparator=;');
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- | ---------------------------------------- | ------ |
-- | POLYGON((-10 109, 90 9, -10 9, -10 109)) | 1 |
-- | POLYGON((90 109, 190 9, 90 9, 90 109)) | 2 |
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/FILE_TABLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ SELECT * FROM commune LIMIT 2;
CALL FILE_TABLE('/home/user/COMMUNE.SHP', 'commune44');
SELECT * FROM commune44 LIMIT 2;
-- Answer:
-- | the_geom | NOM |
-- | geom | NOM |
-- | ----------------------------------------- | ------- |
-- | MULTIPOLYGON(((350075.2 6719771.8, | Puceul |
-- | 350072.7 6719775.5, 350073 6719780.7, | |
Expand Down
6 changes: 3 additions & 3 deletions docs/dev/GeoJsonWrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The default value of `fileEncoding` is `ISO-8859-1`.

{% highlight mysql %}
-- Write a spatial table to a GeoJSON file:
CREATE TABLE TEST(ID INT PRIMARY KEY, THE_GEOM POINT);
CREATE TABLE TEST(ID INT PRIMARY KEY, GEOM POINT);
INSERT INTO TEST VALUES (1, 'POINT(0 1)');
INSERT INTO TEST VALUES (2, 'POINT(2 4)');

Expand All @@ -42,7 +42,7 @@ CALL GeoJsonWrite('/home/user/test.geojson', 'TEST');
CALL GeoJsonRead('/home/user/test.geojson', 'TEST2');
SELECT * FROM TEST2;
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- |-------------|----|
-- | POINT(0 1) | 1 |
-- | POINT(2 4) | 2 |
Expand All @@ -58,7 +58,7 @@ CALL GeoJsonWrite('/home/user/test.geojson',
CALL GeoJsonRead('/home/user/test.geojson', 'TEST2');
SELECT * FROM TEST2;
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- |-------------|----|
-- | POINT(0 1) | 1 |
{% endhighlight %}
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/JsonWrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Write a spatial table and export it into a JSON file.

{% highlight mysql %}
-- Initialize the spatial table
CREATE TABLE TEST(ID INT PRIMARY KEY, THE_GEOM POINT);
CREATE TABLE TEST(ID INT PRIMARY KEY, GEOM POINT);
INSERT INTO TEST VALUES (1, 'POINT(0 1)');
-- Export
CALL JsonWrite('/home/user/test.json', 'TEST');
Expand All @@ -34,7 +34,7 @@ CALL JsonWrite('/home/user/test.json', 'TEST');
Open the `test.json` file.

{% highlight json %}
{"ID":1,"THE_GEOM":"POINT (0 1)"}
{"ID":1,"GEOM":"POINT (0 1)"}
{% endhighlight json %}

##### See also
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/KMLWrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A coordinate reference system must be set to save a KML file.

{% highlight mysql %}
-- Create an example table to write to a KML file:
CREATE TABLE TEST(ID INT PRIMARY KEY, THE_GEOM POINT);
CREATE TABLE TEST(ID INT PRIMARY KEY, GEOM POINT);
INSERT INTO TEST
VALUES (1, ST_GeomFromText('POINT(2.19 47.58)', 4326));

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ PostGIS has a jdbc:postgres_jts: Driver that let the user the choice to switch b

# Create spatial table from csv
```sql
create table roads(the_geom MultiLineString) as select ST_GeomFromText(the_geom) from CSVREAD('/home/user/roads.csv');
create table roads(geom MultiLineString) as select ST_GeomFromText(geom) from CSVREAD('/home/user/roads.csv');
```
8 changes: 4 additions & 4 deletions docs/dev/OSMRead.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Reads a [OSM][wiki] file from `path` and creates several tables prefixed by `tab
11 tables are produced.

* (1) table_prefix + _tag : table that contains all tag keys listed in the OSM file -> ID_TAG SERIAL PRIMARY KEY, TAG_KEY VARCHAR UNIQUE.
* (2) table_prefix + _node : table that contains all nodes -> ID_NODE BIGINT PRIMARY KEY, THE_GEOM POINT,ELE DOUBLE PRECISION,USER_NAME VARCHAR,UID BIGINT,VISIBLE BOOLEAN,VERSION INTEGER,CHANGESET INTEGER,LAST_UPDATE TIMESTAMP, NAME VARCHAR.
* (2) table_prefix + _node : table that contains all nodes -> ID_NODE BIGINT PRIMARY KEY, GEOM POINT,ELE DOUBLE PRECISION,USER_NAME VARCHAR,UID BIGINT,VISIBLE BOOLEAN,VERSION INTEGER,CHANGESET INTEGER,LAST_UPDATE TIMESTAMP, NAME VARCHAR.
* (3) table_prefix + _node_tag : table that contains a list of tag keys (TAG_VALUE) for each node -> ID_NODE BIGINT, ID_TAG BIGINT,TAG_VALUE VARCHAR.
* (4) table_prefix + _way : table that contains all ways -> ID_WAY BIGINT PRIMARY KEY, USER_NAME VARCHAR, UID BIGINT, VISIBLE BOOLEAN, VERSION INTEGER, CHANGESET INTEGER, LAST_UPDATE TIMESTAMP, NAME VARCHAR.
* (5) table_prefix + _way_tag : table that contains a list of tag keys (TAG_VALUE) for each way -> ID_WAY BIGINT, ID_TAG BIGINT, VALUE VARCHAR.
Expand Down Expand Up @@ -75,7 +75,7 @@ H2GIS extract buildings:
DROP TABLE IF EXISTS OSM_BRETAGNE_BUILDINGS;
CREATE TABLE OSM_BRETAGNE_BUILDINGS(ID_WAY BIGINT PRIMARY KEY) AS SELECT DISTINCT ID_WAY FROM OSM_BRETAGNE_WAY_TAG WT, OSM_BRETAGNE_TAG T WHERE WT.ID_TAG = T.ID_TAG AND T.TAG_KEY IN ('building');
DROP TABLE IF EXISTS OSM_BRETAGNE_BUILDINGS_GEOM;
CREATE TABLE OSM_BRETAGNE_BUILDINGS_GEOM AS SELECT ID_WAY, ST_MAKEPOLYGON(ST_MAKELINE(THE_GEOM)) THE_GEOM FROM (SELECT (SELECT ST_ACCUM(THE_GEOM) THE_GEOM FROM (SELECT N.ID_NODE, N.THE_GEOM,WN.ID_WAY IDWAY FROM OSM_BRETAGNE_NODE N,OSM_BRETAGNE_WAY_NODE WN WHERE N.ID_NODE = WN.ID_NODE ORDER BY WN.NODE_ORDER) WHERE IDWAY = W.ID_WAY) THE_GEOM ,W.ID_WAY FROM OSM_BRETAGNE_WAY W,OSM_BRETAGNE_BUILDINGS B WHERE W.ID_WAY = B.ID_WAY) GEOM_TABLE WHERE ST_GEOMETRYN(THE_GEOM,1) = ST_GEOMETRYN(THE_GEOM, ST_NUMGEOMETRIES(THE_GEOM)) AND ST_NUMGEOMETRIES(THE_GEOM) > 2;
CREATE TABLE OSM_BRETAGNE_BUILDINGS_GEOM AS SELECT ID_WAY, ST_MAKEPOLYGON(ST_MAKELINE(GEOM)) GEOM FROM (SELECT (SELECT ST_ACCUM(GEOM) GEOM FROM (SELECT N.ID_NODE, N.GEOM,WN.ID_WAY IDWAY FROM OSM_BRETAGNE_NODE N,OSM_BRETAGNE_WAY_NODE WN WHERE N.ID_NODE = WN.ID_NODE ORDER BY WN.NODE_ORDER) WHERE IDWAY = W.ID_WAY) GEOM ,W.ID_WAY FROM OSM_BRETAGNE_WAY W,OSM_BRETAGNE_BUILDINGS B WHERE W.ID_WAY = B.ID_WAY) GEOM_TABLE WHERE ST_GEOMETRYN(GEOM,1) = ST_GEOMETRYN(GEOM, ST_NUMGEOMETRIES(GEOM)) AND ST_NUMGEOMETRIES(GEOM) > 2;
{% endhighlight %}

PostGIS extract buildings:
Expand All @@ -86,8 +86,8 @@ CREATE TABLE OSM_BRETAGNE_BUILDINGS AS SELECT DISTINCT ID_WAY FROM OSM_BRETAGNE_
ALTER TABLE OSM_BRETAGNE_BUILDINGS ADD PRIMARY KEY(ID_WAY);
DROP TABLE IF EXISTS OSM_BRETAGNE_BUILDINGS_GEOM;
CREATE TABLE OSM_BRETAGNE_BUILDINGS_GEOM AS SELECT ID_WAY,
ST_MAKEPOLYGON(ST_MAKELINE(THE_GEOM)) THE_GEOM FROM (SELECT (SELECT ST_ACCUM(THE_GEOM) THE_GEOM FROM
(SELECT N.ID_NODE, N.THE_GEOM,WN.ID_WAY IDWAY FROM OSM_BRETAGNE_NODE N,OSM_BRETAGNE_WAY_NODE WN WHERE N.ID_NODE = WN.ID_NODE ORDER BY WN.NODE_ORDER) ORDEREDNODES WHERE ORDEREDNODES.IDWAY = W.ID_WAY) THE_GEOM ,W.ID_WAY FROM OSM_BRETAGNE_WAY W,OSM_BRETAGNE_BUILDINGS B WHERE W.ID_WAY = B.ID_WAY) GEOM_TABLE WHERE ARRAY_LENGTH(THE_GEOM, 1) > 2 AND ST_EQUALS(THE_GEOM[1],THE_GEOM[ARRAY_LENGTH(THE_GEOM, 1)]);
ST_MAKEPOLYGON(ST_MAKELINE(GEOM)) GEOM FROM (SELECT (SELECT ST_ACCUM(GEOM) GEOM FROM
(SELECT N.ID_NODE, N.GEOM,WN.ID_WAY IDWAY FROM OSM_BRETAGNE_NODE N,OSM_BRETAGNE_WAY_NODE WN WHERE N.ID_NODE = WN.ID_NODE ORDER BY WN.NODE_ORDER) ORDEREDNODES WHERE ORDEREDNODES.IDWAY = W.ID_WAY) GEOM ,W.ID_WAY FROM OSM_BRETAGNE_WAY W,OSM_BRETAGNE_BUILDINGS B WHERE W.ID_WAY = B.ID_WAY) GEOM_TABLE WHERE ARRAY_LENGTH(GEOM, 1) > 2 AND ST_EQUALS(GEOM[1],GEOM[ARRAY_LENGTH(GEOM, 1)]);
{% endhighlight %}

##### See also
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/OpenJUMP.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ $$;


```sql
select the_geom::varbinary the_geom from BATI_INDIFFERENCIE where the_geom && ${view:0}
select geom::varbinary geom from BATI_INDIFFERENCIE where geom && ${view:0}
```
```sql
SELECT ST_Extent(the_geom)::varbinary from BATI_INDIFFERENCIE;
SELECT ST_Extent(geom)::varbinary from BATI_INDIFFERENCIE;
```

4 changes: 2 additions & 2 deletions docs/dev/SHPRead.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CALL SHPRead('/home/user/COMMUNE.SHP', 'commune44utf',
'utf-8');
SELECT * FROM commune44utf LIMIT 2;
-- Answer:
-- | THE_GEOM | NOM |
-- | GEOM | NOM |
-- | ----------------------------------------- | ------- |
-- | MULTIPOLYGON(((350075.2 6719771.8, | Puceul |
-- | 350072.7 6719775.5, 350073 6719780.7, | |
Expand All @@ -59,7 +59,7 @@ CALL SHPRead('/home/user/COMMUNE.SHP', 'commune44iso',
'iso-8859-1');
SELECT * FROM commune44iso LIMIT 2;
-- Answer:
-- | THE_GEOM | NOM |
-- | GEOM | NOM |
-- | ----------------------------------------- | ------- |
-- | MULTIPOLYGON(((350075.2 6719771.8, | Puceul |
-- | 350072.7 6719775.5, 350073 6719780.7, | |
Expand Down
12 changes: 6 additions & 6 deletions docs/dev/SHPWrite.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The default value of `fileEncoding` is `ISO-8859-1`.

{% highlight mysql %}
-- Create an example table containing POLYGONs and export it.
CREATE TABLE AREA(THE_GEOM GEOMETRY, ID INT PRIMARY KEY);
CREATE TABLE AREA(GEOM GEOMETRY, ID INT PRIMARY KEY);
INSERT INTO AREA VALUES
('POLYGON((-10 109, 90 9, -10 9, -10 109))', 1),
('POLYGON((90 109, 190 9, 90 9, 90 109))', 2);
Expand All @@ -55,7 +55,7 @@ CALL SHPWrite('/home/user/area.shp', 'AREA');
CALL SHPRead('/home/user/area.shp', 'AREA2');
SELECT * FROM AREA2;
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- | ------------------------------------------------ | -- |
-- | MULTIPOLYGON(((-10 109,, 90 9, -10 9, -10 109))) | 1 |
-- | MULTIPOLYGON(((90 109, 190 109, 90 9, 90 109))) | 2 |
Expand All @@ -71,7 +71,7 @@ CALL SHPWRITE('/home/user/area.shp',
CALL SHPRead('/home/user/area.shp', 'AREA2');
SELECT * FROM AREA2;
-- Answer:
-- | THE_GEOM | ID |
-- | GEOM | ID |
-- | ------------------------------------------------ | -- |
-- | MULTIPOLYGON(((-10 109,, 90 9, -10 9, -10 109))) | 1 |
{% endhighlight %}
Expand All @@ -83,14 +83,14 @@ If you want to export your shapefile with it's projection, stored in a .prj file
If not, the SRID must be enforced using the following commands:

{% highlight mysql %}
UPDATE mytable SET the_geom = ST_SetSRID(the_geom, EPSG_CODE);
ALTER TABLE mytable ADD CHECK ST_SRID(the_geom) = EPSG_CODE;
UPDATE mytable SET geom = ST_SetSRID(geom, EPSG_CODE);
ALTER TABLE mytable ADD CHECK ST_SRID(geom) = EPSG_CODE;
{% endhighlight %}

Where:

* `mytable` is the table name to update
* `the_geom` is the geometric field name
* `geom` is the geometric field name
* `EPSG_CODE` is the EPSG id corresponding to your system (e.g `4326` for `WGS84` or `2154` for the french `Lambert 93`).

Then export your shapefile as seen before.
Expand Down
8 changes: 4 additions & 4 deletions docs/dev/ST_CollectionExtract.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ Only `POINT`s, `LINE`s and `POLYGON`s are returned.
### Examples

{% highlight mysql %}
SELECT ST_CollectionExtract('POLYGON ((1 3, 1 0, 4 0, 4 2, 5 5, 1 3))', 3) as THE_GEOM;
SELECT ST_CollectionExtract('POLYGON ((1 3, 1 0, 4 0, 4 2, 5 5, 1 3))', 3) as GEOM;
-- Answer: POLYGON ((1 3, 1 0, 4 0, 4 2, 5 5, 1 3))
{% endhighlight %}
<img class="displayed" src="../ST_CollectionExtract_1.png"/>

{% highlight mysql %}
SELECT ST_CollectionExtract('MULTILINESTRING ((0 0, 4 1), (1 1, 5 5))', 2) as THE_GEOM;
SELECT ST_CollectionExtract('MULTILINESTRING ((0 0, 4 1), (1 1, 5 5))', 2) as GEOM;
-- Answer: MULTILINESTRING ((0 0, 4 1), (1 1, 5 5))
{% endhighlight %}
<img class="displayed" src="../ST_CollectionExtract_2.png"/>
Expand All @@ -44,13 +44,13 @@ SELECT ST_CollectionExtract('GEOMETRYCOLLECTION(
MULTIPOINT((4 4), (1 1), (1 0), (0 3)),
LINESTRING(2 6, 6 2),
POLYGON((1 2, 4 2, 4 6, 1 6, 1 2)))', 2)
as THE_GEOM;
as GEOM;
-- Answer: LINESTRING (2 6, 6 2)
{% endhighlight %}
<img class="displayed" src="../ST_CollectionExtract_3.png"/>

{% highlight mysql %}
SELECT ST_CollectionExtract('POLYGON ((1 3, 1 0, 4 0, 4 2, 5 5, 1 3))', 2) as THE_GEOM;
SELECT ST_CollectionExtract('POLYGON ((1 3, 1 0, 4 0, 4 2, 5 5, 1 3))', 2) as GEOM;
-- Answer: GEOMETRYCOLLECTION EMPTY
{% endhighlight %}
<img class="displayed" src="../ST_CollectionExtract_4.png"/>
Expand Down
14 changes: 7 additions & 7 deletions docs/dev/ST_Explode.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ The select `query` must be enclosed in parenthesis `()`.

{% highlight mysql %}
CREATE TABLE test_point AS SELECT
'MULTIPOINT((1 1), (2 2))'::Geometry as THE_GEOM;
'MULTIPOINT((1 1), (2 2))'::Geometry as GEOM;

-- ST_Explode using the 'tableName'
SELECT * FROM ST_Explode('test_point');

-- or
-- ST_Explode using a 'query'
SELECT * FROM ST_Explode('(SELECT * FROM test_point
WHERE ST_Dimension(THE_GEOM)=0)');
WHERE ST_Dimension(GEOM)=0)');

-- Answer:
-- | THE_GEOM | EXPLOD_ID |
-- | GEOM | EXPLOD_ID |
-- | ------------|-----------|
-- | POINT(1 1) | 1 |
-- | POINT(2 2) | 2 |
Expand All @@ -51,11 +51,11 @@ SELECT * FROM ST_Explode('(SELECT * FROM test_point

{% highlight mysql %}
CREATE TABLE test_point AS SELECT
'MULTIPOINT((1 1), (2 2))'::Geometry the_geomA,
'MULTIPOINT((3 3), (2 6))'::Geometry the_geomB;
SELECT * FROM ST_Explode('test_point', 'the_geomB');
'MULTIPOINT((1 1), (2 2))'::Geometry geomA,
'MULTIPOINT((3 3), (2 6))'::Geometry geomB;
SELECT * FROM ST_Explode('test_point', 'geomB');
-- Answer:
-- | THE_GEOMA | THE_GEOMB | EXPLOD_ID |
-- | GEOMA | GEOMB | EXPLOD_ID |
-- |---------------------------|-------------|-----------|
-- | MULTIPOINT((1 1), (2 2)) | POINT(3 3) | 1 |
-- | MULTIPOINT((1 1), (2 2)) | POINT(2 6) | 2 |
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/ST_GeometryShadow.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,12 @@ SELECT ST_Geometryshadow('POLYGON((356090.9 6693096.6, 356132.1 6693112.3, 35614
Computes shadow on polygons that are in a table and which height is stored in a field.

{% highlight mysql %}
CREATE TABLE building (the_geom geometry, height double);
CREATE TABLE building (geom geometry, height double);
INSERT INTO building values('POLYGON((356090.9 6693096.6, 356132.1 6693112.3, 356147.4 6693071.3, 356105.8 6693055.8, 356090.9 6693096.6))', 6);
INSERT INTO building values('POLYGON((356160 6693075.8, 356144.7 6693116.9, 356185.8 6693132.4, 356201.2 6693091.6, 356160 6693075.8))', 10);

-- Then computes the polygon's shadows
SELECT ST_Geometryshadow(the_geom, ST_SunPosition('POINT(-1.54544 47.24961)','2015-01-30 10:00:00+01:00'), height) FROM building;
SELECT ST_Geometryshadow(geom, ST_SunPosition('POINT(-1.54544 47.24961)','2015-01-30 10:00:00+01:00'), height) FROM building;

-- Answer:
-- POLYGON ((356067.9938547645 6693117.20421851 0, 356109.19385476445 6693132.90421851 0, 356132.1 6693112.3 0, 356090.9 6693096.6 0, 356096.43312310067 6693081.448897818 0, 356096.4331231008 6693081.448897818 0, 356105.8 6693055.8 0, 356082.89385476446 6693076.40421851 0, 356067.9938547645 6693117.20421851 0))
Expand Down
Loading