[postgis-users] [EXTERNAL] Re: Replacement for Oracle's TRANSFORM_LAYER procedure?

Bryan Hall bryan.hall at chk.com
Wed May 9 09:01:17 PDT 2018

Classification: DCL-Internal


SDO_CS.TRANSFORM_LAYER clones the input table (or MV) to a new table, transforming the geometry column specified to the new SRID. For example:


This clones the LSE_DETAIL_ACTIVE table to one called LDA_NAD27, while transforming the SHAPE column to SRID 4267.


From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Alexandre Neto
Sent: Wednesday, May 09, 2018 10:46
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: [EXTERNAL] Re: [postgis-users] Replacement for Oracle's TRANSFORM_LAYER procedure?

You may need to explain what SDO_CS.TRANSFORM does.

To transform a table's geometry SRID I use the following:

ALTER TABLE <table_name> ALTER COLUMN <geom_column_name> TYPE geometry(<geometry_type>, <target_CRS>) USING ST_Transform(<geom_column_name>, <target_CRS>);

Bryan Hall <bryan.hall at chk.com<mailto:bryan.hall at chk.com>> escreveu no dia quarta, 9/05/2018 às 16:02:

I’m starting to look at the stored procedures we will need to move to PostGIS from Oracle, and I don’t see anything like SDO_CS.TRANSFORM_LAYER in the manual for a built-in procedure. Yes of course there is ST_Transform, but that does it in place, or in-line. However, here we are making a new table in a different SRID and it would be rather nice not to hard-code the columns in the source table (or MV in this case), or copy the table as a whole and then do a clunky in-place update. Yes, I’d rather just add another geography column and make it a computed column – but stupid ESRI software has to read this data. 😊

Is there a good site to look for “convenience functions” like this for PostGIS? I’d rather not spend time “re-inventing the wheel” if I don’t have to.

Thanks, Bryan


postgis-users mailing list
postgis-users at lists.osgeo.org<mailto:postgis-users at lists.osgeo.org>
Alexandre Neto


This email (and attachments if any) is intended only for the use of the individual or entity to which it is addressed, and may contain information that is confidential or privileged and exempt from disclosure under applicable law. If the reader of this email is not the intended recipient, or the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by return email and destroy all copies of the email (and attachments if any).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20180509/55d3ad05/attachment.html>

More information about the postgis-users mailing list