<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI Emoji";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
p.m-2230994736842027623msipheader9d2ba7ab, li.m-2230994736842027623msipheader9d2ba7ab, div.m-2230994736842027623msipheader9d2ba7ab
{mso-style-name:m_-2230994736842027623msipheader9d2ba7ab;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.inbox-inbox-comment-copy
{mso-style-name:inbox-inbox-comment-copy;}
span.inbox-inbox-inbox-inbox-comment-copy
{mso-style-name:inbox-inbox-inbox-inbox-comment-copy;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
p.msipheader9d2ba7ab, li.msipheader9d2ba7ab, div.msipheader9d2ba7ab
{mso-style-name:msipheader9d2ba7ab;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="msipheader9d2ba7ab" align="center" style="text-align:center"><span style="font-size:8.0pt;color:#0078D7">Classification: DCL-Internal</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<p class="MsoNormal"><a name="_MailEndCompose">Alexandre,<o:p></o:p></a></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose">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:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose">SDO_CS.TRANSFORM_LAYER('LSE_DETAIL_ACTIVE','SHAPE','LDA_NAD27',4267);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose">This clones the LSE_DETAIL_ACTIVE table to one called LDA_NAD27, while transforming the SHAPE column to SRID 4267.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose">Bryan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-bookmark:_MailEndCompose"><o:p> </o:p></span></p>
<span style="mso-bookmark:_MailEndCompose"></span>
<p class="MsoNormal"><b>From:</b> postgis-users [mailto:postgis-users-bounces@lists.osgeo.org]
<b>On Behalf Of </b>Alexandre Neto<br>
<b>Sent:</b> Wednesday, May 09, 2018 10:46<br>
<b>To:</b> PostGIS Users Discussion <postgis-users@lists.osgeo.org><br>
<b>Subject:</b> [EXTERNAL] Re: [postgis-users] Replacement for Oracle's TRANSFORM_LAYER procedure?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">You may need to explain what SDO_CS.TRANSFORM does.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">To transform a table's geometry SRID I use the following:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="inbox-inbox-comment-copy">ALTER TABLE <table_name> ALTER COLUMN <geom_column_name> TYPE geometry(<geometry_type>, <target_CRS>) USING ST_Transform(</span><span class="inbox-inbox-inbox-inbox-comment-copy"><geom_column_name></span><span class="inbox-inbox-comment-copy">,
</span><span class="inbox-inbox-inbox-inbox-comment-copy"><target_CRS></span><span class="inbox-inbox-comment-copy">);</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Bryan Hall <<a href="mailto:bryan.hall@chk.com">bryan.hall@chk.com</a>> escreveu no dia quarta, 9/05/2018 às 16:02:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.
<span style="font-family:"Segoe UI Emoji",sans-serif">😊</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">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.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks, Bryan<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal">_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.osgeo.org_mailman_listinfo_postgis-2Dusers&d=DwMFaQ&c=M7nMI6M-Uv3ihEfN-QJ3_sQdVexoO64eU4Ftr4lnVk0&r=-89XSUoV_kZKlHf89FQGuyqPyUjA53juyA-7r7GoZVA&m=VJx8UZRUZFpdr1ed5RsLe4AkoOQd6583QJe3ijFDTKI&s=GRSBAMi-gfM8IbXGcO8-kpVRYTqVoNl5C2bc0Ns2VYc&e=" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Alexandre Neto<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">---------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">@AlexNetoGeo<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__sigsemgrilhetas.wordpress.com&d=DwMFaQ&c=M7nMI6M-Uv3ihEfN-QJ3_sQdVexoO64eU4Ftr4lnVk0&r=-89XSUoV_kZKlHf89FQGuyqPyUjA53juyA-7r7GoZVA&m=VJx8UZRUZFpdr1ed5RsLe4AkoOQd6583QJe3ijFDTKI&s=Qg237IQgPug6UcNiYy0IK1RXInkSfDg09SweWtZAo40&e=">http://sigsemgrilhetas.wordpress.com</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gisunchained.wordpress.com&d=DwMFaQ&c=M7nMI6M-Uv3ihEfN-QJ3_sQdVexoO64eU4Ftr4lnVk0&r=-89XSUoV_kZKlHf89FQGuyqPyUjA53juyA-7r7GoZVA&m=VJx8UZRUZFpdr1ed5RsLe4AkoOQd6583QJe3ijFDTKI&s=sjDQ5sUi7TYoGrSSYxZoCjL3CfUebZ_wTdr9koJG_Ds&e=">http://gisunchained.wordpress.com</a><o:p></o:p></p>
</div>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
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).</font>
</body>
</html>