I think that <b>geocode_intersection</b> function would be perfect!<div><br></div><div>I just entered an enhancement request at <a href="http://trac.osgeo.org/postgis/ticket/1333">http://trac.osgeo.org/postgis/ticket/1333</a>.</div>
<div><br></div><div>I totally understand about merging into the existing <b>geocode</b> function. A counter-strategy might be to require the <b>&</b> symbol? But if you're requiring that, then seems like it wouldn't be much more work for the developer to split into cross streets rather than having postgis figure that out upon every geocode.</div>
<div><div><div><br></div><div>Aren</div><div><br><div class="gmail_quote">On Mon, Nov 28, 2011 at 4:08 PM, Paragon Corporation <span dir="ltr"><<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">It doesn't geocode cross streets or if it is its share
accident. I think what it's doing is just picking the first one most
likely so you are getting at the beginning of a street with that name and it's
ignoring the second street at best.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">The cross streets feature takes a different algorithm.
We do have that coded as a sub process in one of our projects, but it's not
committed in tiger geocoder. Feel free to post a ticket under
tiger_geocoder </font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">if you are interested in seeing it incorporated into
tiger geocoder.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font size="2" face="Arial"><a href="http://trac.osgeo.org/postgis/" target="_blank">http://trac.osgeo.org/postgis/</a></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Right now what we have can be relatively easily incorporated
in tiger geocoder to be a function of the form:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">geocode_intersection(roadway1, roadway2, city, state,
zip)</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Would that work for you? I would hesitate to try to
merge into the existing geocode function since I'm not sure how much unnecessary
processing that would add if people know they aren't dealing with cross street
addresses.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Thanks,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial">Leo and Regina</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"><a href="http://www.postgis.us" target="_blank">http://www.postgis.us</a></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" size="2" face="Arial"></font></span> </div><br>
<blockquote style="BORDER-LEFT:#0000ff 2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px" dir="ltr">
<div dir="ltr" lang="en-us" align="left">
<hr>
<font size="2" face="Tahoma"><b>From:</b>
<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a>
[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net" target="_blank">postgis-users-bounces@postgis.refractions.net</a>] <b>On Behalf Of
</b>Aren Cambre<br><b>Sent:</b> Monday, November 28, 2011 3:14
PM<br><b>To:</b> PostGIS Users Discussion<br><b>Subject:</b> Re:
[postgis-users] Geocoding cross streets?<br></font><br></div><div><div class="h5">
<div></div>Hey, thanks!
<div><br></div>
<div>I used this query:</div>
<div><br></div>
<div><b>SELECT g.rating, ST_X(geomout) AS lon, ST_Y(geomout) AS lat, (addy).*
FROM geocode('<span style="BACKGROUND-COLOR:rgb(255,255,0)">XXXX</span>') as g;</b></div>
<div><b><br></b></div>
<div>where <b>XXXX</b> is replaced with strings like:</div>
<div>
<ul>
<li><b>erin and tralee, dallas, tx</b>
</li><li><b>erin & tralee, dallas, tx</b>
</li><li><b>sagecanyon & sagegreen, houston, tx</b> </li></ul></div>
<div>Those produce lat/longs that are a few miles from the correct
locations.</div>
<div><b><br></b></div>
<div>Aren</div>
<div><br>
<div class="gmail_quote">On Mon, Nov 28, 2011 at 1:33 PM, Johnathan Leppert
<span dir="ltr"><<a href="mailto:johnathan.leppert@gmail.com" target="_blank">johnathan.leppert@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Cross-streets should be supported. Can you supply your
exact query and what versions of PostGIS and geocoder you are using?
<div><br></div>
<div>Johnathan<br><br>
<div class="gmail_quote">
<div>
<div>On Mon, Nov 28, 2011 at 9:26 AM, Aren Cambre <span dir="ltr"><<a href="mailto:aren@arencambre.com" target="_blank">aren@arencambre.com</a>></span> wrote:<br></div></div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div>I have the TIGER geocoder running with PostGIS 2.0 as per <a href="http://www.letseehere.com/postgis-geocoder-using-tiger-2010-data" target="_blank">http://www.letseehere.com/postgis-geocoder-using-tiger-2010-data</a>.
<div><br></div>
<div>It seems to do well finding street addresses, but it can't seem to
find cross streets. For example, if I geocode <b>sagecanyon and
sagegreen, houston, tx</b>, I get a location on the other side of town.
Here's a Google Map showing both: <a href="http://g.co/maps/nphp9" target="_blank">http://g.co/maps/nphp9</a></div>
<div><br></div>
<div>Can I even use the TIGER geocoder for cross streets?</div>
<div><br></div><font color="#888888">
<div>Aren</div></font><br></div></div>
<div>_______________________________________________<br>postgis-users
mailing list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></div></blockquote></div><span><font color="#888888"><br><br clear="all">
<div><br></div>-- <br><i><font color="#cccccc">Johnathan</font></i>
<div><font color="#cccccc">Software Engineer</font></div>
<div><font color="#cccccc">San Francisco, </font><font color="#cccccc">California</font></div>
<div><i><font color="#cccccc"><a href="http://twitter.com/#!/iamleppert" target="_blank">Follow me on Twitter:
@iamleppert</a></font></i></div><br></font></span></div><br>_______________________________________________<br>postgis-users
mailing list<br><a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div></div></blockquote></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br></div></div></div>