GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Trying to optimizing API usage  XML
Forum Index -> General
Author Message

Joined: 28/08/2018 20:27:10
Messages: 2

Forgive me if this is something easy and I just did not find the corresponding documentation. I'm grateful for any pointer or suggestion.

For a given set of lat/lon coordinates I need to figure out

ZIP (Postal Code)
{Street Name or 'Location' }

to fill image location metadata.

Currently I'm using up to 4 webservice endpoints:

1. /findNearbyPlaceNameJSON

When this does not return an Altitude I use

2. /astergdemJSON

Then I calll

3. /findNearbyPostalCodesJSON

to get the ZIP if available.
If no street name was found so far, I also call

4. /findNearbyStreetsOSMJSON

I'm trying to reduce the number of endpoint calls to reduce to reduce server load and to process more files with less credits.

Is there a better endpoint? Some that returns all the requested data in one call perhaps?Code:


Joined: 28/08/2018 20:27:10
Messages: 2

I assume that there is no better way then?

Joined: 08/12/2005 07:39:47
Messages: 4139

If you know the country then you could use the new address service:
It is available for 17 countries so far and includes most of the information you need. The elevation is not yet included. For the elevation you can reduce the credits usage when you combine many lat/lng in one call. In particular if they are nearby the credits usage will be smaller.

findNearbyPostalcode never has a street name. You could first call OSM and if it does not include a postal code you can then call the postal code service.

Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team