[postgis-users] Geocoding cross streets?
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Nov 28 15:30:18 PST 2011
Yes, this makes sense. Regardless you can always add a higher level
parser to deal with parsing a single field of input and splitting it
into fields and then deciding which appropriate API to call to get results.
I have written and contributed to PAGC a single line address parser that
works for US addresses. It is a standalone C module that can be reused
and is licensed under MIT-X style license, so it could be picked up and
easily wrapped with a plpgsql wrapper to pass text on input and get a
fielded record of parsed results.
-Steve
On 11/28/2011 5:53 PM, Paragon Corporation wrote:
> Steve,
>
> Yap that's what we were thinking. That's why we have it as a separate
> function specifically for cross intersection which will take the form:
>
> geocode_intersection(roadway1, roadway2, city, state, zip)
>
> So we at least for the first pass, are not going to assume any symbol etc.
> to break (we have enough issues with our normalize logic that we are
> cleaning up).
> We'll force people to type the streets in as separate arguments.
>
>
> For our case we already have it coded that way so the easiest to port since
> ours (the use case we have it coded for) is fed from a user interface
> that looks somethng like
>
> where people have
>
> Address: ________________________________ (goes regular route)
>
> or
>
> Cross Street of ______________ and _____________ (goes thru our geocode
> intersection route)
>
> option.
>
>
>
>
>> -----Original Message-----
>> From: postgis-users-bounces at postgis.refractions.net
>> [mailto:postgis-users-bounces at postgis.refractions.net] On
>> Behalf Of Stephen Woodbridge
>> Sent: Monday, November 28, 2011 5:39 PM
>> To: postgis-users at postgis.refractions.net
>> Subject: Re: [postgis-users] Geocoding cross streets?
>>
>> On 11/28/2011 5:28 PM, Aren Cambre wrote:
>>> I think that *geocode_intersection* function would be perfect!
>>>
>>> I just entered an enhancement request at
>>> http://trac.osgeo.org/postgis/ticket/1333.
>>>
>>> I totally understand about merging into the existing
>> *geocode* function.
>>> A counter-strategy might be to require the *&* symbol? But if you're
>>
>> This is actually not a good idea from the point of view that
>> the Tiger data does have street names the contain an&
>> character like "B& O", "Tom& Ann" or something like that,
>> and others. I already did this analysis when looking at PAGC
>> geocoder and Tiger data. You will also fine the word "and" in
>> some street names so that is not good as a separator. In PAGC
>> I arbitrarily pick the '@' character as it is not used in the
>> Tiger data and it reads as "street a (at) street b" which
>> seems as good as any definition for an intersection.
>>
>> Thanks,
>> -Steve W
>>
>>> 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.
>>>
>>> Aren
>>>
>>> On Mon, Nov 28, 2011 at 4:08 PM, Paragon Corporation<lr at pcorp.us
>>> <mailto:lr at pcorp.us>> wrote:
>>>
>>> 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.
>>> 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
>>> if you are interested in seeing it incorporated into
>> tiger geocoder.
>>> http://trac.osgeo.org/postgis/
>>> Right now what we have can be relatively easily incorporated in
>>> tiger geocoder to be a function of the form:
>>> geocode_intersection(roadway1, roadway2, city, state, zip)
>>> 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.
>>> Thanks,
>>> Leo and Regina
>>> http://www.postgis.us
>>>
>>> *From:* postgis-users-bounces at postgis.refractions.net
>>> <mailto:postgis-users-bounces at postgis.refractions.net>
>>> [mailto:postgis-users-bounces at postgis.refractions.net
>>> <mailto:postgis-users-bounces at postgis.refractions.net>] *On
>>> Behalf Of *Aren Cambre
>>> *Sent:* Monday, November 28, 2011 3:14 PM
>>> *To:* PostGIS Users Discussion
>>> *Subject:* Re: [postgis-users] Geocoding cross streets?
>>>
>>> Hey, thanks!
>>>
>>> I used this query:
>>>
>>> *SELECT g.rating, ST_X(geomout) AS lon,
>> ST_Y(geomout) AS lat,
>>> (addy).* FROM geocode('XXXX') as g;*
>>> *
>>> *
>>> where *XXXX* is replaced with strings like:
>>>
>>> * *erin and tralee, dallas, tx*
>>> * *erin& tralee, dallas, tx*
>>> * *sagecanyon& sagegreen, houston, tx*
>>>
>>> Those produce lat/longs that are a few miles from
>> the correct
>>> locations.
>>> *
>>> *
>>> Aren
>>>
>>> On Mon, Nov 28, 2011 at 1:33 PM, Johnathan Leppert
>>> <johnathan.leppert at gmail.com
>>> <mailto:johnathan.leppert at gmail.com>> wrote:
>>>
>>> Cross-streets should be supported. Can you
>> supply your exact
>>> query and what versions of PostGIS and geocoder
>> you are using?
>>>
>>> Johnathan
>>>
>>> On Mon, Nov 28, 2011 at 9:26 AM, Aren Cambre
>>> <aren at arencambre.com
>> <mailto:aren at arencambre.com>> wrote:
>>>
>>> I have the TIGER geocoder running with
>> PostGIS 2.0 as
>>> per
>>>
>> http://www.letseehere.com/postgis-geocoder-using-tiger-2010-data.
>>>
>>>
>>> It seems to do well finding street addresses, but it
>>> can't seem to find cross streets. For example, if I
>>> geocode *sagecanyon and sagegreen, houston,
>> tx*, I get a
>>> location on the other side of town. Here's
>> a Google Map
>>> showing both: http://g.co/maps/nphp9
>>>
>>> Can I even use the TIGER geocoder for cross streets?
>>>
>>> Aren
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> <mailto:postgis-users at postgis.refractions.net>
>>>
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>>
>>>
>>> --
>>> /Johnathan /
>>> Software Engineer
>>> San Francisco, California
>>> /Follow me on Twitter: @iamleppert
>>> <http://twitter.com/#!/iamleppert> /
>>>
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> <mailto:postgis-users at postgis.refractions.net>
>>>
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> <mailto:postgis-users at postgis.refractions.net>
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at postgis.refractions.net
>>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list