[postgis-users] Intersection query help

White, Richard Richard.White at infoterra-global.com
Wed May 2 02:21:41 PDT 2012


Hi,

The following query works and returns a new table with all the
intersections between table1 and table2

CREATE TABLE intersections AS
(SELECT ST_Intersection(table1.geom, table2.geom) as inter
FROM table1, table2
WHERE table2.gridref = 'NN')

However, the new table "intersections" does not contain any of the
attributes from either of the sources tables.

How would I get the column "table2.gridref" included in the new table?

Thanks.

Regards,

R.


Infoterra Ltd. Is part of the Astrium GEO-Information Services Division and a wholly owned subsidiary of Astrium, Europe's leading space systems and services specialist.

Disclaimer. The information contained in this e-mail and its attachments are confidential and intended only for the use of the named addressee(s). If you are not the intended addressee, please do not read, copy, use or disclose this message or its attachments. If you have received this message in error, please notify the sender immediately and delete or destroy all copies of this message and attachments in all media. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Infoterra Ltd and shall not form part of any binding agreement.

Infoterra Limited a company registered in England under number 2359955 and having its registered office at Atlas House, 41 Wembley Road, Leicester, LE3 1UT. VAT number GB 476 0468 27. 

P Before printing, think about the environment 




More information about the postgis-users mailing list