Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Introduction

In collaboration with the Treasurer/Tax Collector we are making a restful street address geocoding service available. This page describes this service. We are trying to follow the OGC standard which is described here.

The Service

Here is the DEV URL with an example address of "100 Main St":

http://10.250.60.189/streetNetwork/geocode/findAddressCandidates?f=json&Address=100 Main St&Zip=94105

The service  uses the street segment network only.
These data are carefully maintained by Dept of Public works.
We return a single best candidate and have not  implemented a scoring system.
Instead of scoring we return exceptions to help you correct the input data.

This returns JSON like so:

{
    "inputAddressString": "100 Main St", 
    "inputZipCodeString": "94105", 
    "spatialReference": {
        "wkid": 4326
    }, 
    "foundMatch": true, 
    "foundEasMatch": false, 
    "candidates": [
        {
            "address": "100 MAIN ST", 
            "location": "POINT (-122.3948959209805700 37.7917552676099080)", 
            "score": null, 
            "attributes": {
                "StreetName": "MAIN", 
                "StreetType": "ST"
            }, 
            "addressNumber": "100", 
            "street": {
                "streetNamePrimary": {
                    "base_street_name": "MAIN", 
                    "street_type": "ST"
                }, 
                "streetNameAliases": [], 
                "l_f_add": 101, 
                "l_t_add": 199, 
                "r_f_add": 100, 
                "r_t_add": 198, 
                "seg_cnn": 8628000, 
                "geometry": "MULTILINESTRING ((-122.3949402377882200 37.7918420903234780, -122.3934079394635700 37.7906126704266400))"
            }, 
            "zipCode": "94105", 
            "jurisdiction": "SF MAIN"
        }
    ], 
    "validations": [], 
    "didYouMean": []
}

We strongly prefer JSON but we can produce XML if you buy us a beer.
We have tested the DEV implementation against all the Treasurers data with these results:

found street matchfound eas matchcountpercent
falsefalse  
truefalse  
truetrue  
   100


You can see the unit tests here.

Examples

Below are several validation links.

These calls should find a :

http://10.250.60.189/streetNetwork/geocode/findAddressCandidates?f=json&Address=100 Main St&Zip=94105

You can send data with no street suffix...

http://10.250.60.189/streetNetwork/geocode/findAddressCandidates?f=json&Address=157 Noe&Zip=94114

but only if the suffix not needed for disambiguation:

157 STANYAN

We can't parse everything:

PMB 169 3701 SACRAMENTO ST

but we do have future plans for alaises.

We support the didYouMean idiom:

1000 18TH

Reading JSON

The JSON is formatted for readability but your browser may obscure that.
The way to see the nicely formated JSON is to right click on the web page and select "view source".
The Chrome browser has a nice feature here:  (You need to copy and paste the text below to the Chrome address bar and hit enter.)

view-source:http://10.250.60.189/validate/streetAddress/1560%20DAVIDSON%20AVE/

 

  • No labels