Ticket #1354 (closed defect: fixed)

Opened 18 months ago

Last modified 3 weeks ago

Problems geocoding addresses containing "ST STE"

Reported by: bpanulla Owned by: robe
Priority: medium Milestone: PostGIS 2.1.0
Component: pagc_address_parser Version: trunk
Keywords: Cc: woodbri

Description

The geocoder gets confused by addresses with a type of "ST" followed immediately by an internal address beginning with "STE", even though normalize_address() appears to handle this without issue.

normalize_address()

SELECT addy.*
FROM normalize_address('6226 E PIMA ST STE 999, TUCSON') AS addy;
AddressPre-DirStreet Street TypePost-DirInternalLocalityStateZipparsed
6226EPIMA STStSTE 999TUSCONAZt

geocode() with bad string

SELECT g.rating, (addy).*
FROM geocode('6226 E PIMA ST STE 999, TUCSON, AZ') AS g;
RatingAddressPre-DirStreetStreet TypePost-DirInternalLocalityStateZipparsed
100TusconAZ85641t

geocode() with amended string

If you replace "ST" with "STREET" the geocoder performs as desired.

SELECT g.rating, (addy).*
FROM geocode('6226 E PIMA STREET STE 999, TUCSON, AZ') AS g;
RatingAddressPre-DirStreetStreet TypePost-DirInternalLocalityStateZipparsed
16226EPimaStSTE 999TusconAZ85712t

Change History

Changed 18 months ago by robe

  • status changed from new to assigned

Changed 15 months ago by robe

  • milestone changed from PostGIS 2.0.0 to PostGIS 2.1.0

Changed 15 months ago by robe

  • milestone changed from PostGIS 2.1.0 to PostGIS 2.0.1

Changed 12 months ago by robe

  • milestone changed from PostGIS 2.0.1 to PostGIS 2.1.0

Changed 7 months ago by woodbri

  • cc woodbri added

Changed 5 months ago by woodbri

PAGC tools handle this.

Changed 7 weeks ago by robe

  • component changed from tiger geocoder to pagc_address_parser

rather than just push these, I'm going to move them to things that pagc_address_parser can handle or should and close them out once tested and pagc integrated as an option.

Changed 3 weeks ago by robe

  • status changed from assigned to closed
  • resolution set to fixed

This works fine with pagc_normalize function.

SELECT addy.*
FROM pagc_normalize_address('6226 E PIMA ST STE 999, TUCSON') AS addy;

Yields:

 address | predirabbrev | streetname | streettypeabbrev | postdirabbrev | internal  | location | stateabbrev | zip | parsed
---------+--------------+------------+------------------+---------------+-----------+----------+-------------+-----+--------
    6226 | E            | PIMA       | St               |               | SUITE 999 | TUCSON   |             |     | t

and then geocoder should do the the right thing with that, but I don't have AZ data loaded to verify.

Changed 3 weeks ago by robe

oops forgot the AZ

SELECT * FROM pagc_normalize_address('6226 E PIMA ST STE 999, TUCSON, AZ') AS addy;
 address | predirabbrev | streetname | streettypeabbrev | postdirabbrev | internal  | location | stateabbrev | zip | parsed
---------+--------------+------------+------------------+---------------+-----------+----------+-------------+-----+--------
    6226 | E            | PIMA       | St               |               | SUITE 999 | TUCSON   | AZ          |     | t
Note: See TracTickets for help on using tickets.