CREATE TABLE NewPointLayer AS SELECT *, ST_PointOnSurface(the_geom)::geometry(Point,32632) AS the_geom FROM OldPolygonLayer
From: postgis-users <[email protected]> On Behalf Of [email protected] Sent: Thursday, 04 July 2019 13:47 To: [email protected] Subject: [postgis-users] creating points from polygons, storing all attributes Hi, I would like to create a point table from a polygon table. One point in each polygon Query = CREATE TABLE NewPointLayer AS SELECT ST_PointOnSurface(the_geom)::geometry(Point,32632) AS the_geom FROM OldPolygonLayer But how do I write the query to get all the attributes from OldPolygonLayer to the NewPointLayer? Thanks in advance, Paul
_______________________________________________ postgis-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/postgis-users
