[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] Appending geometry data from another table
From: Michael Fuhr <mike () fuhr ! org>
Date: 2006-10-21 4:31:44
Message-ID: 20061021043144.GA78538 () winnie ! fuhr ! org
[Download RAW message or body]
On Fri, Oct 20, 2006 at 08:01:41PM -0600, Bruce Rindahl wrote:
> Thanks for the hint. After testing I got the final solution:
> INSERT into county_parcels SELECT
> 'Archuleta' as county,
> cast(GeomFromText(asText(the_geom),26913) as geometry) as the_geom
> FROM county_temp;
>
> I needed to cast the result as a geometry type and specify the SRID for the
> constraint on the table.
GeomFromText() returns a geometry type; the cast shouldn't be necessary.
> If there is a cleaner solution I would love to hear it.
If county_temp.the_geom is a geometry and if you don't need to
transform the coordinates then you could use SetSRID():
INSERT INTO county_parcels
SELECT 'Archuleta', SetSRID(the_geom, 26913)
FROM county_temp;
--
Michael Fuhr
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic