<html style="direction: ltr;">
<head>
<meta content="text/html; charset=windows-1255"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="preferred-charset"
bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi:<br>
<br>
On 08/05/2013 09:26 PM, Diego Roberto wrote:<br>
</div>
<blockquote
cite="mid:CAExGL8EhBCQyBtaU4hpzCzARrvWNTrA3+viY5hAGJKq5P-qA+A@mail.gmail.com"
type="cite">
<div>Hello I am conducting a survey to check if a point that I am
trying to insert already exists a point near recorded in a
radius of 300 meters.</div>
<div>I use this query to perform this procedure:</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline">
SELECT i.id_impediments </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><span
class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span> FROM impediments AS i </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><span
class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span> WHERE st_dwithin( </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline">
<span class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span>GeomFromText('POINT(-49.256452
-16.674886)',4326)::geography,</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline">
<span class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span>i.geometry_data, </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><span
class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span> 300)</div>
</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)">So
far so good, however for coordinates outside the 'Brazil'
displays the following error:</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Coordinate
values are out of range [-180 -90, 180 90] for GEOGRAPHY type<br>
</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Following
SQL:</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline">SELECT
i.id_impediments </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><span
class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span> FROM impediments AS i </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><span
class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span> WHERE st_dwithin( </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline">
<span class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span>GeomFromText('POINT(37.797848
-122.466774)',4326)::geography,</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline">
<span class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span>i.geometry_data, </div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><span
class="Apple-tab-span"
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;white-space:pre">
</span> 300) AND i.id_type =5</div>
</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
</blockquote>
<br>
Are your Lon/Lat coordinates backwards?<br>
I think it should be POINT(-122.466774 37.797848)<br>
<br>
<blockquote
cite="mid:CAExGL8EhBCQyBtaU4hpzCzARrvWNTrA3+viY5hAGJKq5P-qA+A@mail.gmail.com"
type="cite">
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:rgb(255,255,255)">
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><font
color="#222222" face="Arial, Helvetica, sans-serif">How
should I treat this information, can someone help me? The
way I'm working is correct?</font></div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><font
color="#222222" face="Arial, Helvetica, sans-serif"><br>
</font></div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline"><font
color="#222222" face="Arial, Helvetica, sans-serif">Thank
you.</font></div>
</div>
<div
style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Diego.</div>
<div><br>
</div>
<br>
This mail was received via Mail-SeCure System.<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
GIS Consultant, Arava Development Co.
<a class="moz-txt-link-freetext" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a></pre>
</body>
</html>