[postgis-users] Correct use of ST_Transform

Simon Greener simon at spatialdbadvisor.com
Mon May 4 21:44:10 PDT 2009


Benton,

> /* Insert transformed records */
> INSERT INTO spl_road_centre_line(gid, the_geom)
> SELECT gid
>      , the_geom
>      , st_transform(the_geom, 4283)
>   FROM spl_road_centre_line_mga
>  ORDER BY gid ASC;

Why do you have 3 columns in the select writing into two in the INSERT? Shouldn't it be:

INSERT INTO spl_road_centre_line(
               gid, the_geom
)
SELECT gid, st_transform(the_geom, 4283)
   FROM spl_road_centre_line_mga
 ORDER BY gid ASC;

Simon
-- 
SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
  Email: simon at spatialdbadvisor.com
  Voice: +61 362 396397
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)
NAC:W80CK 7SWP3



More information about the postgis-users mailing list