<html><body><div style="color:#000; background-color:#fff; font-family:garamond, new york, times, serif;font-size:14px"><div id="yui_3_16_0_1_1421937723168_42958">Thanks for all the replies!</div><div id="yui_3_16_0_1_1421937723168_42961" dir="ltr"> Actually, I must have done something wrong yesterday because my query I came up with works:</div><div id="yui_3_16_0_1_1421937723168_42963" dir="ltr"><br></div><div id="yui_3_16_0_1_1421937723168_42965" dir="ltr"><b>select ST_Asgeojson( geom ) from polys where
ST_Intersects(ST_GeomFromGeoJSON('$jsonPoly'), geom)=TRUE and
ST_Touches(ST_GeomFromGeoJSON('$jsonPoly'), geom)=FALSE</b></div><div id="yui_3_16_0_1_1421937723168_42967" dir="ltr"><br></div><div id="yui_3_16_0_1_1421937723168_42970" dir="ltr">I must have had a <i>TRUE/FALSE</i> and/or <i>AND/OR</i> wrong.</div><div id="yui_3_16_0_1_1421937723168_42972" dir="ltr"><br></div><div id="yui_3_16_0_1_1421937723168_42983" dir="ltr">I went through several tests, and all scenarios where the polys lie in various places with respect to each other, and every test past.</div><div id="yui_3_16_0_1_1421937723168_42981" dir="ltr"><br></div><div id="yui_3_16_0_1_1421937723168_43079" dir="ltr">Toni:</div><div id="yui_3_16_0_1_1421937723168_43081" dir="ltr"> The ST_Relate looks interesting, too. I'll have to check that out.</div><div id="yui_3_16_0_1_1421937723168_43083" dir="ltr"><br></div><div id="yui_3_16_0_1_1421937723168_42974" dir="ltr">Thanks again for the quick replies!</div><div id="yui_3_16_0_1_1421937723168_42979" dir="ltr"><br></div><div id="yui_3_16_0_1_1421937723168_42934"><span></span></div><div id="yui_3_16_0_1_1421937723168_42968"> </div><div id="yui_3_16_0_1_1421937723168_42976"><div id="yui_3_16_0_1_1421937723168_42975">If life gives you lemons, keep them-- because hey.. free lemons.
</div><br><br><div id="yui_3_16_0_1_1421937723168_43010">
<br>"~heart~ Sticker" fixer: http://microflush.org/stuff/stickers/heartFix.html
</div><br><br><div id="yui_3_16_0_1_1421937723168_43012">
<br></div></div><br> <div id="yui_3_16_0_1_1421937723168_43020" style="font-family: garamond, new york, times, serif; font-size: 14px;"> <div id="yui_3_16_0_1_1421937723168_43019" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1421937723168_43018" dir="ltr"> <hr id="yui_3_16_0_1_1421937723168_43088" size="1"> <font id="yui_3_16_0_1_1421937723168_43022" face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> toni hernández <toni@sigte.udg.edu><br> <b><span style="font-weight: bold;">To:</span></b> Joseph Spenner <joseph85750@yahoo.com>; PostGIS Users Discussion <postgis-users@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, January 22, 2015 1:50 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [postgis-users] Possible for ST_Intersects to not include the perimeter?<br> </font> </div> <div id="yui_3_16_0_1_1421937723168_43024" class="y_msg_container"><br><div id="yiv9776804789"><div id="yui_3_16_0_1_1421937723168_43026">
Joseph,<br clear="none">
<br clear="none">
With St_Relate (<a id="yui_3_16_0_1_1421937723168_43028" rel="nofollow" shape="rect" class="yiv9776804789moz-txt-link-freetext" target="_blank" href="http://postgis.net/docs/ST_Relate.html">http://postgis.net/docs/ST_Relate.html</a>) we can get
all kind of relations between geometries. <br clear="none">
You can get boundary intersections, interior intersections, interior
intersections without boundary intersections.... all possibilities
are supported.<br clear="none">
<br clear="none">
St_Relate uses the DE-91M model to define this relations between
geometries.<br clear="none">
To know more about DE-91M: <a rel="nofollow" shape="rect" class="yiv9776804789moz-txt-link-freetext" target="_blank" href="http://en.wikipedia.org/wiki/DE-9IM">http://en.wikipedia.org/wiki/DE-9IM</a><br clear="none">
<br clear="none">
<br clear="none">
<br clear="none">
<a rel="nofollow" shape="rect" class="yiv9776804789moz-txt-link-freetext" target="_blank" href="http://postgis.net/docs/using_postgis_dbmanagement.html#DE-9IM">http://postgis.net/docs/using_postgis_dbmanagement.html#DE-9IM</a><br clear="none">
<br clear="none">
<div class="qtdSeparateBR"><br><br></div><div class="yiv9776804789yqt7034163684" id="yiv9776804789yqt86292"><div class="yiv9776804789moz-cite-prefix">On 21/01/2015 22:22, Joseph Spenner
wrote:<br clear="none">
</div>
<blockquote type="cite">
<div style="color:#000;background-color:#fff;font-family:garamond, new york, times, serif;font-size:14px;"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">I have a polygon as an
input, and I'm trying to find all polygons which share points,
but not the perimiter points themselves. Is this possible?</span>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_194991"><br clear="none">
<span id="yiv9776804789yui_3_16_0_1_1421843595215_194968"></span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_194992"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">Real application:</span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_194993"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968"> I have NWS polygons
describing Thunderstorm Warnings, which are made up of
counties within the state. Some of those counties might be
on the edge of the state. I want to query my database to
show me all Warnings which are in a supplied state.
However, if I query the <i>adjacent</i> state which borders
the counties from the first state, I get those Warnings
because they share the same parimeter points.</span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195026"><br clear="none">
<span id="yiv9776804789yui_3_16_0_1_1421843595215_194968"></span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195032"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">Is there a way to
construct a query which will not return anything if the only
points in common are the perimeter values themselves?</span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195033"><br clear="none">
<span id="yiv9776804789yui_3_16_0_1_1421843595215_194968"></span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195034"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">I tried a few
variations on
ST_Intersects/ST_Covers/ST_Contains/ST_Overlaps, supplying
various AND/OR and TRUE/FALSE combinatins, but I can't seem
to get the right combo to accomplish my task.</span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195087"><br clear="none">
<span id="yiv9776804789yui_3_16_0_1_1421843595215_194968"></span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195088"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">Any help would be
great.</span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195107"><br clear="none">
<span id="yiv9776804789yui_3_16_0_1_1421843595215_194968"></span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195106"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">Thanks!</span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195091"><br clear="none">
<span id="yiv9776804789yui_3_16_0_1_1421843595215_194968"></span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195090"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">Regards,</span></div>
<div dir="ltr" id="yiv9776804789yui_3_16_0_1_1421843595215_195089"><span id="yiv9776804789yui_3_16_0_1_1421843595215_194968">Joseph Spenner</span><br clear="none">
</div>
<div id="yiv9776804789yui_3_16_0_1_1421843595215_194841"><br clear="none">
<div id="yiv9776804789yui_3_16_0_1_1421843595215_195015">
<br clear="none">
</div>
</div>
</div>
<br clear="none">
<fieldset class="yiv9776804789mimeAttachmentHeader"></fieldset>
<br clear="none">
<pre>_______________________________________________
postgis-users mailing list
<a rel="nofollow" shape="rect" class="yiv9776804789moz-txt-link-abbreviated" ymailto="mailto:postgis-users@lists.osgeo.org" target="_blank" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a rel="nofollow" shape="rect" class="yiv9776804789moz-txt-link-freetext" target="_blank" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a></pre>
</blockquote></div>
<br clear="none">
</div></div><br><br></div> </div> </div> </div></body></html>