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

Default postprocessors on EsriWGS are too strict. #19

Open
lliss opened this issue Apr 2, 2015 · 1 comment
Open

Default postprocessors on EsriWGS are too strict. #19

lliss opened this issue Apr 2, 2015 · 1 comment

Comments

@lliss
Copy link
Contributor

lliss commented Apr 2, 2015

Be default, if doing a gazetteer style search, the defautl postprocessors filter out everything.

To test:

Set up and run a new geocoder with EsriWSG:

pq = PlaceQuery(query='the white house', country='US')
result = geocoder.geocode(pq)

You should get a few responses from the raw response:

[<White House (-77.036428, 38.897928) EsriWGS>, <The White House (-122.633387, 45.57894) EsriWGS>]

But they get filtered out in /services/base.py

except Exception as e:
            upstream_response_info.set_success(False)
            upstream_response_info.errors.append(format_exc())
            return [], upstream_response_info
        if len(candidates) > 0:
            for p in self._postprocessors: # apply universal candidate postprocessing
                candidates = p.process(candidates) # merge lists
        return candidates, upstream_response_info
@KlaasH
Copy link
Contributor

KlaasH commented Apr 4, 2018

I ran into this again, trying to geocode localities and wondering why it doesn't return anything for e.g. "Philadelphia, PA". Seems preferable to me to have the default postprocessors be permissive and let users refine them if necessary. As it is, it's easy to assume that the underlying service is failing in cases where it's actually doing exactly what's desired but the results are getting dropped by the postprocessors.

The list of possibilities is here, but I'm not sure it makes sense to pick a subset to allow by default. Dropping the AttrFilter on locator_type from DEFAULT_POSTPROCESSORS altogether might make more sense.

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