<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:"Time new Roman";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-language:DE;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:DE;}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Tahoma",sans-serif;
        color:windowtext;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage22
        {mso-style-type:personal-reply;
        font-family:"Tahoma",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif">Moin Hannes,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">that is exactly what I needed. Thank you very much.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">Grüße zurück<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> Johannes Kröger (WhereGroup) <johannes.kroeger@wheregroup.com>
<br>
<b>Gesendet:</b> Dienstag, 24. Januar 2023 09:58<br>
<b>An:</b> Reetz, Michael (NLPVW) <Michael.Reetz@nlpvw.niedersachsen.de>; qgis-user@lists.osgeo.org<br>
<b>Betreff:</b> Re: [Qgis-user] Transform some records in an SQL Server table<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:solid #003333 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<p style="line-height:10.0pt;background:#D5EAFF"><span style="font-size:10.0pt;font-family:"Time new Roman",serif;color:red">ACHTUNG!!</span><span style="font-size:10.0pt;font-family:"Time new Roman",serif"> Diese E-Mail erreicht Sie von einem Absender außerhalb
 der niedersächsischen Landesverwaltungs-Infrastruktur mit TLS-Verschlüsselung. Bitte klicken Sie auf keine Links oder öffnen Sie keine E-Mail-Anhänge, falls Sie den Absender nicht kennen und nicht wissen, ob der Inhalt sicher ist.</span><span style="font-size:10.0pt;font-family:"Time new Roman",serif;mso-fareast-language:DE"><o:p></o:p></span></p>
</div>
<div>
<p>Moin Michael,<o:p></o:p></p>
<p>yay for the zone prefix "32" for the easting because you use those huge numbers to determine which of the two CRS they belong to. If the easting (x) value is > 30000000, then you have to transform the coordinates to EPSG:25832, otherwise you don't.<o:p></o:p></p>
<p>Some untested pseudocode:<o:p></o:p></p>
<p>if(<br>
  (x(@geometry) > 30000000),<span lang="EN-US" style="font-family:"Tahoma",sans-serif">transform($geometry, 'EPSG:4647', 'EPSG:25832'), $geometry)</span><o:p></o:p></p>
<p><span lang="EN-US" style="font-family:"Tahoma",sans-serif">Grüße an die Nordsee<br>
Hannes</span><o:p></o:p></p>
<p><span lang="EN-US" style="font-family:"Tahoma",sans-serif">PS: For older QGIS use $geometry</span><o:p></o:p></p>
<p><o:p> </o:p></p>
<div>
<p class="MsoNormal">Am 24.01.23 um 09:02 schrieb Reetz, Michael (NLPVW) via QGIS-User:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif">Hello list,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">I have an SQL Server table with a geometry attribute. Most of the records are in EPSG 25832 but some are in EPSG 4647. Is it possible to transform these records to EPSG 25832? I’ve
 tried to do this with „geom_to_wkt(transform($geometry, 'EPSG:4647', 'EPSG:25832'))“ in the field calculator. But since QGIS assumes that all coordinates are already in this crs, this doesn’t work. Any other idea?</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;mso-fareast-language:DE">Best regards</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;mso-fareast-language:DE">Michael</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;mso-fareast-language:DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;mso-fareast-language:DE">*****************************************
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;mso-fareast-language:DE">Michael Reetz</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;mso-fareast-language:DE">Datenbanken und Anwendungsentwicklung<br>
Nationalpark-Verwaltung Niedersächsisches Wattenmeer <br>
Virchowstr. 1 | 26382 Wilhelmshaven <br>
Tel.: +49 (0) 4421 911 291 <br>
e-mail: <a href="mailto:michael.reetz@nlpv-wattenmeer.niedersachsen.de"><span style="color:blue">michael.reetz@nlpvw.niedersachsen.de</span></a>
<br>
Web: <a href="https://www./"><span style="color:blue">https://www.</span></a><u><span style="color:blue">nationalpark-wattenmeer.de</span></u>
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE"><img border="0" width="219" height="118" style="width:2.2812in;height:1.2291in" id="Grafik_x0020_1" src="cid:image001.png@01D92FE2.03F17350"></span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE"><br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>QGIS-User mailing list<o:p></o:p></pre>
<pre><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><o:p></o:p></pre>
<pre>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
<pre>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre>
</blockquote>
<pre>-- <o:p></o:p></pre>
<pre>Johannes Kröger / GIS-Entwickler/-Berater<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>---------------------------------------------<o:p></o:p></pre>
<pre>Schon gewusst?<span style="font-family:"Tahoma",sans-serif">
</span><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>In unserem Blog geben wir Tipps & Tricks zu<o:p></o:p></pre>
<pre>Open-Source-GIS-Software und berichten aus <o:p></o:p></pre>
<pre>unserem Experten-Alltag:<o:p></o:p></pre>
<pre><a href="https://wheregroup.com/blog/">https://wheregroup.com/blog/</a><o:p></o:p></pre>
<pre>---------------------------------------------<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>WhereGroup GmbH<o:p></o:p></pre>
<pre>Grevenweg 89<o:p></o:p></pre>
<pre>20537 Hamburg<o:p></o:p></pre>
<pre>Germany<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Tel: +49 (0)228 / 90 90 38 - 36<o:p></o:p></pre>
<pre>Fax: +49 (0)228 / 90 90 38 - 11<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><a href="mailto:johannes.kroeger@wheregroup.com">johannes.kroeger@wheregroup.com</a><o:p></o:p></pre>
<pre><a href="http://www.wheregroup.com">www.wheregroup.com</a><o:p></o:p></pre>
<pre>Geschäftsführer:<o:p></o:p></pre>
<pre>Olaf Knopp, Peter Stamm <o:p></o:p></pre>
<pre>Amtsgericht Bonn, HRB 9885<o:p></o:p></pre>
<pre>-------------------------------<o:p></o:p></pre>
</div>
</div>
</body>
</html>