Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nonexistent addresses behave strangely in local services lookup #182

Open
maxatdetroit opened this issue Aug 13, 2024 · 2 comments
Open
Assignees

Comments

@maxatdetroit
Copy link
Member

maxatdetroit commented Aug 13, 2024

Describe the bug

When searching for non-existent (but properly formatted) addresses the service lookup tool continues to return (mostly empty/null) information.

This is related to service request #372977: https://servicedesk.detroitmi.gov/CherwellClient/Access?_=7b354cd9.

To Reproduce
Steps to reproduce the behavior:

  1. Go to local services lookup tool (either running locally or on detroitmi.gov)
  2. Enter the address 4574 Neff Ave.
  3. See malformed output in the UI (e.g. missing neighborhood name, null district manager, etc.)

Note: this can also be reproduced with any numeric address in between two houses. For example, 5104 Buckingham Ave or 5064 Bedford Rd.

Screenshots of google maps showing these "in between" addresses do not exist.

Screenshot 2024-08-13 at 3 57 32 PM

Screenshot 2024-08-13 at 3 58 19 PM

Expected behavior

I'd suggest the expected behavior for these "in between" addresses should be to:

  • Suggest the next closest address (e.g. 4576 Neff Ave. suggested for 4574 Neff Ave.) during input
  • If the user continues to enter a non-existant address (like 4574 Neff Ave.) then display the 'no address found' UI

Screenshot 2024-08-13 at 3 52 05 PM

Note: An alternative way to handle this might be to continue showing neighborhood level information (since we're able to resolve this to a particular lat/long) but provide a warning that the address provided does not resolve to a particular building so we can't show parcel-specific information like whether the property qualifies for 'DWSD Basement Backup Protection Program' or an NEZ abatement.

Screenshots

Examples of the malformed output in the UI:

Screenshot 2024-08-13 at 3 47 40 PM
Screenshot 2024-08-13 at 3 47 58 PM

Additional context
Add any other context about the problem here.

@maxatdetroit maxatdetroit changed the title Specific addresses not found Nonexistent addresses behave strangely in local services lookup Aug 13, 2024
@maxatdetroit
Copy link
Member Author

@jedgar1mx this is the issue I mentioned this afternoon. It's written up a little differently than what I described in the standup. It seems there wasn't an intermittent issue, I just accidentally entered the correct address when debugging. I'm still able to reproduce this issue.

@maxatdetroit
Copy link
Member Author

Looking at a couple API responses for valid and "in between" addresses described above and it looks like the main difference is that invalid "in between" addresses are missing parcel_id, neighborhood_name, council_district, etc.

This prevents the DataLoader.js from using those fields to filter down data relevant for the address like the district manager or neighborhood name.

API is from here:

let url = `https://opengis.detroitmi.gov/opengis/rest/services/BaseUnits/BaseUnitGeocoder/GeocodeServer/findAddressCandidates?Address=&Address2=&Address3=&Neighborhood=&City=&Subregion=&Region=&Postal=&PostalExt=&CountryCode=&SingleLine=${newTempAddr}&outFields=*&maxLocations=&matchOutOfRange=true&langCode=&locationType=&sourceCountry=&category=&location=&distance=&searchExtent=&outSR=&magicKey=&f=json`;

E.g. valid address response:

{
    "spatialReference": {
        "wkid": 4326,
        "latestWkid": 4326
    },
    "candidates": [
        {
            "address": "298 E Palmer St, Detroit, MI, 48202",
            "location": {
                "x": -83.0637225,
                "y": 42.363585
            },
            "score": 100,
            "attributes": {
                "Status": "M",
                "Score": 100,
                "Match_addr": "298 E Palmer St, Detroit, MI, 48202",
                "LongLabel": "298 E Palmer St, Detroit, MI, 48202",
                "ShortLabel": "298 E Palmer St",
                "Addr_type": "PointAddress",
                "Type": "",
                "PlaceName": "",
                "Place_addr": "298 E Palmer St, Detroit, MI, 48202",
                "Phone": "",
                "URL": "",
                "Rank": 20,
                "AddBldg": "",
                "AddNum": "298",
                "AddNumFrom": "",
                "AddNumTo": "",
                "AddRange": "",
                "Side": "",
                "StPreDir": "E",
                "StPreType": "",
                "StName": "Palmer",
                "StType": "St",
                "StDir": "",
                "BldgType": "",
                "BldgName": "",
                "LevelType": "",
                "LevelName": "",
                "UnitType": "",
                "UnitName": "",
                "SubAddr": "",
                "StAddr": "298 E Palmer St",
                "Block": "",
                "Sector": "",
                "Nbrhd": "",
                "District": "",
                "City": "Detroit",
                "MetroArea": "",
                "Subregion": "",
                "Region": "MI",
                "RegionAbbr": "",
                "Territory": "",
                "Zone": "",
                "Postal": "48202",
                "PostalExt": "3824",
                "Country": "",
                "CntryName": "USA",
                "LangCode": "ENG",
                "Distance": 0,
                "X": -83.0637225,
                "Y": 42.363585,
                "DisplayX": -83.0637225,
                "DisplayY": 42.363585,
                "Xmin": -83.0647225,
                "Xmax": -83.0627225,
                "Ymin": 42.362585,
                "Ymax": 42.364585,
                "ExInfo": "",
                "council_district": 5,
                "is_qualified_census_tract": "No",
                "neighborhood_name": "Cultural Center",
                "master_plan_nhood_name": "Lower Woodward",
                "congressional_district": 13,
                "county_commission_district": "District 2",
                "scout_car_area": 306,
                "pdd_design_district": "Central",
                "geo_source": "unit",
                "parcel_id": "01001532.001",
                "building_id": 8921,
                "street_id": 26076,
                "address_id": 325917,
                "related_parcel": "27230483.",
                "snf_zone": ""
            },
            "extent": {
                "xmin": -83.0647225,
                "ymin": 42.362585,
                "xmax": -83.0627225,
                "ymax": 42.364585
            }
        }
    ]
}

E.g. in-between address response:

{
    "spatialReference": {
        "wkid": 4326,
        "latestWkid": 4326
    },
    "candidates": [
        {
            "address": "5104 Buckingham Ave",
            "location": {
                "x": -82.944339546455,
                "y": 42.401873552619
            },
            "score": 100,
            "attributes": {
                "Status": "M",
                "Score": 100,
                "Match_addr": "5104 Buckingham Ave",
                "LongLabel": "5104 Buckingham Ave",
                "ShortLabel": "5104 Buckingham Ave",
                "Addr_type": "StreetAddress",
                "Type": "",
                "PlaceName": "",
                "Place_addr": "5104 Buckingham Ave",
                "Phone": "",
                "URL": "",
                "Rank": 20,
                "AddBldg": "",
                "AddNum": "5104",
                "AddNumFrom": "5000",
                "AddNumTo": "5198",
                "AddRange": "5000-5198",
                "Side": "R",
                "StPreDir": "",
                "StPreType": "",
                "StName": "Buckingham",
                "StType": "Ave",
                "StDir": "",
                "BldgType": "",
                "BldgName": "",
                "LevelType": "",
                "LevelName": "",
                "UnitType": "",
                "UnitName": "",
                "SubAddr": "",
                "StAddr": "5104 Buckingham Ave",
                "Block": "",
                "Sector": "",
                "Nbrhd": "Morningside",
                "District": "",
                "City": "",
                "MetroArea": "",
                "Subregion": "",
                "Region": "",
                "RegionAbbr": "",
                "Territory": "",
                "Zone": "",
                "Postal": "",
                "PostalExt": "",
                "Country": "",
                "CntryName": "USA",
                "LangCode": "ENG",
                "Distance": 0,
                "X": -82.944339546455,
                "Y": 42.401873552619,
                "DisplayX": -82.944339546455,
                "DisplayY": 42.401873552619,
                "Xmin": -82.945339546455,
                "Xmax": -82.943339546455,
                "Ymin": 42.400873552619,
                "Ymax": 42.402873552619,
                "ExInfo": "",
                "council_district": 4,
                "is_qualified_census_tract": "",
                "neighborhood_name": "",
                "master_plan_nhood_name": "",
                "congressional_district": 0,
                "county_commission_district": "",
                "scout_car_area": 0,
                "pdd_design_district": "",
                "geo_source": "",
                "parcel_id": "",
                "building_id": 0,
                "street_id": 0,
                "address_id": 0,
                "related_parcel": "",
                "snf_zone": ""
            },
            "extent": {
                "xmin": -82.945339546455,
                "ymin": 42.400873552619,
                "xmax": -82.943339546455,
                "ymax": 42.402873552619
            }
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants