10.5.2 Reverse G-NAF Look-up with Program 'reverse-gnaf.py'

This is a simple program that lets one do reverse look-ups by giving one or more G-NAF persistent identifiers (PIDs) as arguments. For example, assume a geocode matching returned the two G-NAF PIDs 590217132 and 700517942, using reverse-gnaf.py on the command line

python reverse-gnaf.py 590217132 700517942
will retrieve the information in the corresponding original G-NAF files and produce the following output10.4.
Input PID 590217132 (Locality):
  ***** From file G_LOCALITY *****
           LOCALITY_PID : 590217132
          LOCALITY_NAME : greendale
             SUBURB_PID : 4458
     STATE_ABBREVIATION : nsw
               POSTCODE : 2546
          LOCALITY_TYPE : s
Input PID 700517942 (Address site):
  ***** From file G_ADDRESS_DETAIL *****
               GNAF_PID : gansw703810419
           LOCALITY_PID : 509208351
             STREET_PID : 502993353
           PROPERTY_PID : 2583479
           NUMBER_FIRST : 11
        LEGAL_PARCEL_ID : 104036752
          RURAL_ADDRESS : u
             CONFIDENCE : 2
       ADDRESS_SITE_PID : 700517942
     ***** From file G_LOCALITY *****
              LOCALITY_PID : 509208351
             LOCALITY_NAME : glenmore park
                SUBURB_PID : 1402
        STATE_ABBREVIATION : nsw
             LOCALITY_TYPE : s
     ***** From file G_LOCALITY_ALIAS *****
              LOCALITY_PID : 509208351
                ALIAS_TYPE : syn
             LOCALITY_NAME : mulgoa
        STATE_ABBREVIATION : nsw
     ***** From file G_STREET *****
                STREET_PID : 502993353
               STREET_NAME : miller
               STREET_TYPE : st
              DATE_CREATED : 20040221
     ***** From file G_STREET_LOCALITY_ALIAS *****
                STREET_PID : 502993353
              LOCALITY_PID : 509208351
                ALIAS_TYPE : syn
               STREET_NAME : miller
               STREET_TYPE : st

Note that a reverse look-up shelve must be available and that the value of the variable shelve_name within reverse-gnaf.py must be set to this reverse look-up shelve.

A reverse look-up shelve can be created using the pre-processing program process-gnaf.py by setting the flag create_reverse_lookup_shelve to True. See Section 10.3 for more details.



Footnotes

... output10.4
Values changed to preserve privacy.