<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Chris,<br>
<br>
for the warning if a user is within a mile of the warned area, you
could use ST_DWithin instead of ST_Within.<br>
<br>
Since you have EPSG 4326, I would convert the geometries into
geography types because then you can define the distance in meters
(not in degrees), perhaps like:<br>
<br>
ST_DWithin(mastergistmp.geom::geography, wwmaster.geom::geography,
1610.0)<br>
<br>
Otherwise your UPDATE queries look fine for me...<br>
<br>
Regards,<br>
<br>
Birgit<br>
<pre class="moz-signature" cols="72">
</pre>
Am 27.05.2016 um 02:04 schrieb Chris B:<br>
</div>
<blockquote
cite="mid:CADaZbwGezWMe2Ko1VPXY5z5=pcGqsBONJO3hYM4KB4qdK2hGcg@mail.gmail.com"
type="cite">
<div dir="ltr">I'm trying to put what the warning is for the point
in the polygon, I have my wwmaster which is where all the
warnings are stored, my mastergistmp where my users are stored,
I know if a user is in a severe thunderstorm warning and a
tornado warning the tornado warning will override the severe
storm warning which is what I want does anyone see anything
wrong with this I think I am missing some users in the warned
area. everything is epsg 4326 I would like to also make it where
users with in a mile of the warned area are updated with the
information I've tried st_buffer and have had trouble with it.
I'm updating the mastergistmp.warn or thats what I'm shooting
for.
<div><br>
<div>
<div>UPDATE mastergistmp SET warn = wwmaster.prod_type FROM
wwmaster WHERE wwmaster.prod_type = 'Flash Flood Warning'
and ST_Within(mastergistmp.geom,wwmaster.geom);</div>
<div>UPDATE mastergistmp SET warn = wwmaster.prod_type FROM
wwmaster WHERE wwmaster.prod_type = 'Severe Thunderstorm
Warning' and ST_Within(mastergistmp.geom,wwmaster.geom);</div>
<div>UPDATE mastergistmp SET warn = wwmaster.prod_type FROM
wwmaster WHERE wwmaster.prod_type = 'Tornado Warning' and
ST_Within(mastergistmp.geom,wwmaster.geom);</div>
</div>
<div><br>
</div>
</div>
</div>
<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/mailman/listinfo/postgis-users">http://lists.osgeo.org/mailman/listinfo/postgis-users</a></pre>
</blockquote>
<br>
</body>
</html>