<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks Raúl</div><div><br></div><div>That's what I need!</div><div><br></div><div><span class="gmail-tlid-translation gmail-translation"><span title="" class="gmail-">Thank you very much for your attention.</span></span></div><div><span class="gmail-tlid-translation gmail-translation"><span title="" class="gmail-"><br></span></span></div><div><span class="gmail-tlid-translation gmail-translation"><span title="" class="gmail-">Regards</span></span></div><div><span class="gmail-tlid-translation gmail-translation"><span title="" class="gmail-"><br></span></span></div><div><span class="gmail-tlid-translation gmail-translation"><span title="" class="gmail-">Antônio Olinto<br></span></span></div><div><br></div><div>===================================================</div><div>SELECT ST_MakePoint(-46,-24)<br>-- 010100000000000000000047C000000000000038C0<br><br>SELECT ST_MakePoint(ST_X('010100000000000000000047C000000000000038C0')-0.5,ST_Y('010100000000000000000047C000000000000038C0')-0.5)<br>-- 010100000000000000004047C000000000008038C0<br><br>SELECT ST_AsText('010100000000000000004047C000000000008038C0')<br>-- POINT(-46.5 -24.5)<br><br>SELECT ST_Translate('010100000000000000000047C000000000000038C0',-0.5,-0.5)<br>-- 010100000000000000004047C000000000008038C0<br><br>SELECT ST_AsText('010100000000000000004047C000000000008038C0')<br>-- POINT(-46.5 -24.5)</div><div>===================================================<br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sex, 25 de jan de 2019 às 13:02, Raúl Marín Rodríguez <<a href="mailto:rmrodriguez@carto.com">rmrodriguez@carto.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I understand that you are trying to move a geometry, not summing 2<br>
random geometries (how would that work with polygons for example). If<br>
so, have a look at St_Translate<br>
(<a href="https://postgis.net/docs/ST_Translate.html" rel="noreferrer" target="_blank">https://postgis.net/docs/ST_Translate.html</a>).<br>
<br>
<br>
On Fri, Jan 25, 2019 at 3:54 PM Antonio Silva <<a href="mailto:aolinto.lst@gmail.com" target="_blank">aolinto.lst@gmail.com</a>> wrote:<br>
><br>
> Hello list!<br>
><br>
> Here goes my first e-mail to this list. My name is Antonio Olinto and I work with fisheries research at São Paulo Fisheries Institute, Brazil.<br>
><br>
> I have a point geometry field in a table and I want to add -0.5° to both longitude and latitude.<br>
><br>
> Suppose I have a point at 010100000000000000000047C000000000000038C0 (-46,-24) and I want to add 0101000000000000000000E0BF000000000000E0BF (-0.5,-05) to have 010100000000000000004047C000000000008038C0 (-46.5,-24.5).<br>
><br>
> What I'm doing is<br>
> SELECT ST_MakePoint(ST_X('010100000000000000000047C000000000000038C0')-0.5,ST_Y('010100000000000000000047C000000000000038C0')-0.5)<br>
><br>
> Is there any way to do the sum using only geometries? Something like?<br>
> SELECT '010100000000000000000047C000000000000038C0'+'0101000000000000000000E0BF000000000000E0BF'<br>
>  or<br>
> SELECT ST_SUM('010100000000000000000047C000000000000038C0',<br>
> '0101000000000000000000E0BF000000000000E0BF')?<br>
><br>
> Thanks for any suggestion. Best regards.<br>
><br>
> --<br>
> Antônio Olinto<br>
> _______________________________________________<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://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
<br>
<br>
<br>
-- <br>
Raúl Marín Rodríguez<br>
<a href="http://carto.com" rel="noreferrer" target="_blank">carto.com</a><br>
_______________________________________________<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://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Antônio Olinto Ávila da Silva<div>Biólogo / Oceanógrafo</div><div>Instituto de Pesca (Fisheries Institute)</div><div>São Paulo, Brasil</div></div></div>