<div dir="ltr"><div><div>Thanks Jorge but it isn't the matter.<br></div><div>I'd know why postgis have a different way to calculate the distance<br></div><div>with the same sql query.<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-13 12:37 GMT+02:00 Jorge Gustavo Rocha <span dir="ltr"><<a href="mailto:jgr@di.uminho.pt" target="_blank">jgr@di.uminho.pt</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Franco,<br>
<br>
You can use the usual control statements IF THEN ELSE [1] to make it<br>
exactly like you want.<br>
<br>
[1]<br>
<a href="https://www.postgresql.org/docs/current/static/plpgsql-control-structures.html" rel="noreferrer" target="_blank">https://www.postgresql.org/<wbr>docs/current/static/plpgsql-<wbr>control-structures.html</a><br>
<br>
Regards,<br>
<br>
Jorge<br>
<div><div class="h5"><br>
Às 10:57 de 13-04-2017, franco base escreveu:<br>
> Hi all.<br>
> Is it possible that st_distance between point return meter distance if<br>
> point are very close and degrees otherwise?<br>
><br>
> SELECT ST_distance ( ST_SetSRID<br>
> (ST_MakePoint(45.<wbr>4553804010375,9.<wbr>11292550791171) ,4326), ST_SetSRID<br>
> (ST_MakePoint(45.<wbr>4553855607023,9.<wbr>11291318106981) ,4326))<br>
><br>
> return 1.3 ( meter distance)<br>
><br>
><br>
> SELECT ST_distance ( ST_SetSRID<br>
> (ST_MakePoint(45.<wbr>4553804010375,9.<wbr>11292550791171) ,4326), ST_SetSRID<br>
> (ST_MakePoint(45.<wbr>4560699405679,9.1164832309759) ,4326))<br>
><br>
> return 0.003 (degrees distance)<br>
><br>
><br>
> Thanks<br>
> fb<br>
><br>
><br>
><br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">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/<wbr>mailman/listinfo/postgis-users</a><br>
><br>
<br>
J. Gustavo<br>
--<br>
Jorge Gustavo Rocha<br>
Departamento de Informática<br>
Universidade do Minho<br>
4710-057 Braga<br>
Tel: <a href="tel:%2B351%20253604480" value="+351253604480">+351 253604480</a><br>
Fax: <a href="tel:%2B351%20253604471" value="+351253604471">+351 253604471</a><br>
Móvel: <a href="tel:%2B351%20910333888" value="+351910333888">+351 910333888</a><br>
skype: nabocudnosor<br>
______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">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/<wbr>mailman/listinfo/postgis-users</a></blockquote></div><br></div>