<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I’ve done this with a SQL statement in the past.  (it’s been a few years now.)
<div class=""><br class="">
</div>
<div class="">It was dependent on the lines actually intersecting each other (diagrammatic lifework) vs physical representations.  We had to manually end the line work at the intersections, and in some instances divide lines that need a break at the intersections.</div>
<div class=""><br class="">
</div>
<div class="">You can still do the intersection extract without all this work by using a gap tolerance in the search, but this may lead to more errors depending on number of short street segments, etc in the dataset.</div>
<div class=""><br class="">
</div>
<div class="">Another way to approach this is by matching up street attributes like names.  You can then derive a street intersection name index for zooming-to in a map.  you’ll also likely need to use a self join of some type.</div>
<div class=""><br class="">
</div>
<div class="">Lastly, you can use a straight tabular method, that uses a cartiesian coordinate equation and check every line segment again every other (Hint: a^2 + b^2 = c^2) You don’t even need POSTGIS for this is you have the end points of each line segment
 as coordinates.  In most cases this type of search is very fast.</div>
<div class=""><br class="">
</div>
<div class="">I would look at the ST_INTERSECTS and possibly ST_CROSSES functions to start with, but they don’t actually give up a point.</div>
<div class=""><br class="">
</div>
<div class="">Also, this may help get you started . . .</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://gis.stackexchange.com/questions/20835/identifying-road-intersections-using-postgis" class="">http://gis.stackexchange.com/questions/20835/identifying-road-intersections-using-postgis</a></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">bobb</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 30, 2015, at 11:06 AM, Eduardo Bieñkowski <<a href="mailto:edukoski@gmail.com" class="">edukoski@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class=""><span id="result_box" class="" lang="en"><span class="hps"><span id="result_box" class="" lang="en"><span class="hps">I have</span>
<span class="hps">one and only one</span> <span class="hps">layer</span> <span class="hps">
lines</span> <span class="hps atn">(</span><span class="">they</span> <span class="hps">
are</span> <span class="hps">city streets</span><span class="">)</span></span></span><br class="">
<span class="hps">How</span> <span class="hps">I can</span> <span class="hps">get</span>
<span class="hps">a point layer</span> <span class="hps">where</span> <span class="hps">
the</span> <span class="hps">lines cross</span><span class="">?</span> <span class="hps">
and so have</span> <span class="hps">a layer of</span> <span class="hps">crosspoints</span><br class="">
<br class="">
<span class="hps">Apologize</span> <span class="hps">for my</span> <span class="hps">
English</span></span><br clear="all" class="">
<br class="">
-- <br class="">
<div class="gmail_signature">Eduardo</div>
</div>
_______________________________________________<br class="">
postgis-users mailing list<br class="">
<a href="mailto:postgis-users@lists.osgeo.org" class="">postgis-users@lists.osgeo.org</a><br class="">
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>