photon
photon copied to clipboard
Doesn't handle "City, State" format very well
It looks like photon is looking for a place when characters are added after "New York."
>>> geocoder.komoot('New York').json
{
'address': 'New York, United States of America',
'bbox':
{
'northeast': [-71.7955694, 45.0158611],
'southwest': [-79.761944, 40.477399]
},
'confidence': 10,
'country': 'United States of America',
'lat': 43.1561681,
'lng': -75.8449946,
'ok': True,
'osm_id': 61320,
'osm_key': 'place',
'osm_type': 'R',
'osm_value': 'state',
'raw':
{
'geometry':
{
'coordinates': [-75.8449946, 43.1561681],
'type': 'Point'
},
'type': 'Feature',
'properties':
{
'osm_id': 61320,
'osm_type': 'R',
'extent': [-79.761944, 45.0158611, -71.7955694, 40.477399],
'country': 'United States of America',
'osm_key': 'place',
'osm_value': 'state',
'name': 'New York'
}
},
'state': 'New York',
'status': 'OK'
}
>>> geocoder.komoot('New York, NY').json
{
'address': '37 West 44th Street, New York City New York, United States of America',
'city': 'New York City',
'country': 'United States of America',
'housenumber': '37',
'lat': 40.7555778,
'lng': -73.9815595,
'ok': True,
'osm_id': 3759225465,
'osm_key': 'club',
'osm_type': 'N',
'osm_value': 'sport',
'postal': '10036',
'raw':
{
'geometry':
{
'coordinates': [-73.9815595, 40.7555778],
'type': 'Point'
},
'type': 'Feature',
'properties':
{
'osm_id': 3759225465,
'osm_type': 'N',
'country': 'United States of America',
'osm_key': 'club',
'housenumber': '37',
'city': 'New York City',
'street': 'West 44th Street',
'osm_value': 'sport',
'postcode': '10036',
'name': 'New York Yacht Club',
'state': 'New York'
}
},
'state': 'New York',
'status': 'OK',
'street': 'West 44th Street'
}
I believe the second command should have resulted in the same output as the first.

Most American users expect state abbreviations like NY and VT to work, and get confused and frustrated when they don't. I see this as a major issue!