<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body>
Tyler:<br>
<br>
Thanks. It works.  Could you tell me why the following SQL does not
working?<br>
<br>
<tt>SELECT bridge.gid <br>
FROM bridge, highway <br>
WHERE intersects(bridge.the_geom, highway.the_geom) and highway.gid =
49;</tt><br>
<br>
For your information, the operation with "intersecting" in ArcGIS
worked.<br>
<br>
Jong.<br>
<br>
Tyler Mitchell wrote:<br>
<blockquote
 cite="midOF3574054D.D44B70E1-ON88256E3F.007A809E-88256E3F.007AF9D2@lignum.com"
 type="cite"><br>
  <font size="2"><tt>Hi Jong,</tt></font>
  <br>
  <br>
  <font size="2"><tt>> Wow... Amazing PostGIS!!<br>
  </tt></font>
  <br>
  <font size="2"><tt>That's the spirit!</tt></font>
  <br>
  <br>
  <font size="2"><tt>> Question:     How to select points
on the line?  For example, how to <br>
> select the bridges on the highway?<br>
  </tt></font>
  <br>
  <font size="2"><tt>Good practical question - I get excited thinking
about
just how easy this is to do (with no licensing fees involved!).</tt></font>
  <br>
  <br>
  <font size="2"><tt>I think it will depend on how you define "on
the line".  Do the bridge share the same point as a node in your
line?  Or (as I assume is the case) are your points within a certain
distance from a line (i.e. < 10 metres)?  </tt></font>
  <br>
  <br>
  <font size="2"><tt>If the latter, then something like this should do
the trick:</tt></font>
  <br>
  <br>
  <font size="2"><tt>SELECT bridges.name</tt></font>
  <br>
  <font size="2"><tt>FROM bridges, highways</tt></font>
  <br>
  <font size="2"><tt>WHERE DISTANCE(bridges.geometrycolumn,
highways.geometrycolumn)
< 10;</tt></font>
  <br>
  <br>
  <font size="2"><tt>There are ways to optimize this query, I just gave
you the most basic.</tt></font>
  <br>
  <br>
  <font size="2"><tt>Hope that helps you out.</tt></font>
  <br>
  <br>
  <font size="2"><tt>Tyler</tt></font>
  <pre wrap="">
<hr width="90%" size="4">
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Jong Sung Lee, Graduate Research Assistant
Department of Urban and Regional Planning
University of Illinois at Urbana-Champaign
111 Temple Hoyne Buell Hall
611 East Loredo Taft Dr.
Champaign, IL  61820

Tel:(217)244-6564 
<a class="moz-txt-link-abbreviated" href="mailto:E-mail:jonglee1@uiuc.edu">E-mail:jonglee1@uiuc.edu</a>
</pre>
</body>
</html>