[postgis-users] Can geocode() deal with NYC Hyphenated address numbers and other special types?

dracodoc dracodoc at gmail.com
Tue Dec 1 08:12:46 PST 2015


Thanks! I total understand the complexity of these special cases, so I 
think I'll just ignore the other type of special cases.
As for the NYC address, I tried these variations:

DROP TABLE IF EXISTS addresses_to_geocode;
CREATE TABLE addresses_to_geocode(address text);
INSERT INTO addresses_to_geocode(address)
VALUES     ('40-12 28 AVE , New York City, NY 11103'),
        ('40 28 AVE , New York City, NY 11103');

select     g.address as input_address, 
        pprint_addy(normalize_address(g.address)) as normal_input,
        pprint_addy((g.geo).addy) as normal_output, 
        (g.geo).rating 
from (select address, (geocode(address,1)) as geo
        from addresses_to_geocode
     ) as g;

Results:


So the block number 40 is not recognized anyway. I think the normalize 
function is doing the right thing to just ignore the part "-12", but the 
block number is not a street number so cannot be geocoded?

Thanks a lot for the help!

On Monday, November 30, 2015 at 9:51:55 PM UTC-5, Paragon Corporation wrote:
>
> Steve's comments are right.
>
> I have to double-check how I do the address range thing.  As I might be 
> stripping off the - which would be the wrong thing to do and might be why 
> your 40 is not being kept.
>
> I think the address_standardizer just keeps them together and then when it 
> get's to my casting function, it might just strip off the minus.
>
> Anyway give the address_standardizer a try.  The work Steve and I will be 
> doing is focusing on making that better so it can be used in future 
> geocoders.
>
> Thanks,
> Regina
>
> -----Original Message-----
> From: postgis-users [mailto:postgis-us... at lists.osgeo.org <javascript:>] 
> On Behalf Of Stephen Woodbridge
> Sent: Monday, November 30, 2015 4:21 PM
> To: postgi... at lists.osgeo.org <javascript:>
> Subject: Re: [postgis-users] Can geocode() deal with NYC Hyphenated 
> address numbers and other special types?
>
> I do not believe it is able to deal with  milepost, grid-style, or 
> hyphenated house numbers other than the fact that it can pull off the first 
> number and might use that to interpolate.
>
> First understand that it only do linear interpolation between two number 
> in a range. These complex numbers do not lead themselves to simple linear 
> interpolation. I did an analysis of these address number in the past in 
> Tiger data. Specifically, I compared the address ranges, to look at which 
> components of the number were constant between the start and end of the 
> range and which parts varied over the range.
> It was not obvious in many cases which numbers to use for the 
> interpolation and in some cases it was totally impossible to interpolate 
> because the numbers collected did not make sense (block number at start and 
> single number at end) either through a typographical error in the data or 
> based on who collected the numbers at the end of the segments or how 
> numbers were reassigned when a segment got divided into multiple segments.
>
>
> Also remember you are working with Tiger data which fuzzes the address 
> ranges because of Title 13 concerns.
>
> I'll let others respond to the specifics of the postgis geocoder.
>
> -Steve
>
> On 11/30/2015 3:56 PM, draco doc wrote:
> > Hi,
> >
> > I found there are many special format of addresses that valid in their 
> > local area, but could be quite difficult for geocode() in Tiger Geocoder.
> >
> > Here is a US street address standard document 
> > <
> https://www.fgdc.gov/standards/projects/FGDC-standards-projects/street-address/index_html
> >.
> > Started from page 36 of the final draft, several special cases were 
> listed:
> >
> > 4. Milepost Complete Address Numbers (Example: "Milepost 240").
> >
> > 5. Grid-style Complete Address Numbers (Example:
> > "N89W16758"). In certain communities in and around southern Wisconsin, 
> > Complete Address Numbers include a map grid cell reference preceding 
> > the Address Number.
> >
> > 6. Hyphenated Complete Address Numbers (Example: "5- 5415"). In some 
> > areas (notably certain parts of New York City, southern California, 
> > and Hawaii), Complete Address Numbers often include hyphens.
> >
> > I have 18 million address to geocode, and all these special cases can 
> > be found in my data. From my test, geocode() seemed not be able to 
> > recognize these cases which is totally understandable for me.
> >
> > My questions is, is it possible to modify input a little bit to get a 
> > better than nothing result?
> >
> > For example, if the NYC hyphenated address cannot be recognized, can 
> > we at least remove some part and get a rough location? I have address 
> > like this "40-12 28 AVE , New York City, NY 11103", where 40 is block, 
> > 12 is house number in block. I tried to just remove the 12 and keep 
> > the 40 which is block number, but all I can get is still just the 28 ave.
> >
> > Thanks!
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgi... at lists.osgeo.org <javascript:>
> > http://lists.osgeo.org/mailman/listinfo/postgis-users
> >
>
> _______________________________________________
> postgis-users mailing list
> postgi... at lists.osgeo.org <javascript:>
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
> _______________________________________________
> postgis-users mailing list
> postgi... at lists.osgeo.org <javascript:>
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20151201/2f43ce4a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Auto Generated Inline Image 1
Type: image/png
Size: 5307 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20151201/2f43ce4a/attachment-0001.png>


More information about the postgis-users mailing list