[postgis-users] Re: SRID for USA_Lambert_Conformal_Conic
Stephen Woodbridge
woodbri at swoodbridge.com
Sun Aug 20 09:41:34 PDT 2006
Kishor,
If I have followed the thread correctly, you have two separate table:
1) a table say abc the has data the is already in this projection but
the srid=-1, for this table:
update abc set the_geom=setsrid(the_geom, 102005);
and another table say def that has data in srid=4326
update table def set the_geom=transform(the_geom, 102005);
Now both tables should be in the same transform.
BUT .... there might be constraints on the above table that might
prevent the above operations, so you might want to create new tables and
move the data into those while performing the transforms. I would
recommend this anyway, because it you don't get the result you want you
will have already clobbered the tables you need to try again. Also, the
obvious caution to backup before you do any such large updates, that you
are unsure of.
-Steve W
P Kishor wrote:
> On 8/20/06, Matthew Perry <perrygeo at gmail.com> wrote:
>> On 8/20/06, P Kishor <punkish at eidesis.org> wrote:
>> > Humour me. SetSRID(geometry, integer) and Transform(geometry, integer)
>> > seem/sound almost the same. Is SetSRID more permanent, while Transform
>> > is more for on the fly retreival of data?
>>
>> SetSRID defines what the current spatial reference of the existing
>> geometry is. No actualy transforming/reprojecting will be done.
>>
>> Transform reprojects the geometry from it's native spatial reference
>> (ie as defined by SetSRID) to another.
>
>
> a'ite then... in my language, SetSRID is "metadata" while Transform
> actually "mutates" the data. Now to my original question -- I have two
> datasets in existing SRIDs (actually one of them is -1, and the other
> is 4326). I want to convert them both to my ESRI defined 102005
> (USA_Contiguous_Lambert_Conic) for which I have INSERTed an entry in
> the spatial_ref_sys table. Let's take one of the datasets called, say,
> 'my_table'
>
> What do I do now? Do I
> UPDATE my_table
> SET the_geom = Transform(the_geom, 102005)
>
> or do I
> UPDATE geometry_columns
> SET srid = 102005
> WHERE f_table_name = 'my_table'
>
> or both, or something else?
>
> Many thanks y'all for holding my hand here. All this is not difficult,
> just a bit opaque for now...
>
More information about the postgis-users
mailing list