api icon indicating copy to clipboard operation
api copied to clipboard

Get population value from reverse geocoding result

Open iddqd2d opened this issue 2 years ago • 1 comments

I can get the population value for forward geocoding, but not for reverse geocoding: image

How can I get the population value for reverse geocoding?

iddqd2d avatar May 05 '22 09:05 iddqd2d

Hi @iddqd2d,

Thanks for the report. I can confirm this is true.

Here's a reverse geocoding query for a location in Paris. The results don't include population:

/v1/reverse?layers=locality&point.lat=48.854&point.lon=2.358

Whereas a forward geocoding query for Paris does return population:

/v1/search?text=paris, france

I think this is because coarse reverse geocoding uses the Point-in-Polygon service, which either doesn't include or doesn't return population information. Whereas forward geocoding uses the main Elasticsearch datastore, which does.

orangejulius avatar May 05 '22 13:05 orangejulius