Tomtom Geocoder

0 views
Skip to first unread message

Eliz Cisneroz

unread,
Aug 3, 2024, 5:51:15 PM8/3/24
to divenlerbma

My question is: how?
I think I need a 'geocoder.url' and 'geocoder.key'.
For the key, no problem, just register for the provider and use it.
But for the URL, where can I get it? How can I get it?

I'm currently using Google, but in a few months, I'll be billed 5$/month for the usage.
So, I'm looking for a different solution, excluding LocationIQ and Nominatim that works ok, but in my region give a very generic response when I ask for position.

Geocoding is provided by a number of different services, which are notaffiliated with geopy in any way. These services provide APIs, which anyonecould implement, and geopy is just a library which provides theseimplementations for many different services in a single package.

Different services have different Terms of Use, quotas, pricing,geodatabases and so on. For example, Nominatimis free, but provides low request limits. If you need to make more queries,consider using another (probably paid) service, such asOpenMapQuest or PickPoint(these two are commercial providers of Nominatim, so they shouldhave the same data and APIs). Or, if you are ready to wait, you can trygeopy.extra.rate_limiter.

Basically the usage is the same as in synchronous mode, except thatall geocoder calls should be used with await, and the geocoderinstance should be created by async with. The context manager is optional,however, it is strongly advised to use it to avoid resources leaks.

The options object contains default configuration values forgeocoders, e.g. timeout and User-Agent.Instead of passing a custom value to each geocoder individually, you canoverride a default value in this object.

Only http proxy is supported. Even if the proxy schemeis https, it will be ignored, and the connection betweenclient and proxy would still be unencrypted.However, https requests via http proxy are stillsupported (via HTTP CONNECT method).

A large number of DataFrame rows might produce a significant amount ofgeocoding requests to a Geocoding service, which might be throttledby the service (e.g. by returning Too Many Requests 429 HTTP erroror timing out).

geopy.extra.rate_limiter classes provide a convenientwrapper, which can be used to automatically add delays between geocodingcalls to reduce the load on the Geocoding service. Also it can retryfailed requests and swallow errors for individual rows.

In the example below a delay of 1 second (min_delay_seconds=1)will be added between each pair of geolocator.geocode calls; allgeopy.exc.GeocoderServiceError exceptions will be retried(up to max_retries times):

Deprecated since version 2.3: IGNFrance geocoding methods no longer accept or requireauthentication, see -10-04-evolution-des-modalites-dacces-aux-services-web.This parameter is scheduled for removal in geopy 3.0.

Geopy can calculate geodesic distance between two points using thegeodesic distance or thegreat-circle distance,with a default of the geodesic distance available as the functiongeopy.distance.distance.

The geodesic distance is the shortest distance on the surface of anellipsoidal model of the earth. The default algorithm uses the methodis given by Karney (2013) (geodesic);this is accurate to round-off and always converges.

There are multiple popular ellipsoidal models,and which one will be the most accurate depends on where your points arelocated on the earth. The default is the WGS-84 ellipsoid, which is themost globally accurate. geopy includes a few other models in thedistance.ELLIPSOIDS dictionary:

Set which radius of the earth to use by specifying a radius keywordargument. It must be in kilometers. The default is to use the moduleconstant EARTH_RADIUS, which uses the average great-circle radius.

Latitude and longitude are floating point values in degrees.Altitude is a floating point value in kilometers. The reference levelis never considered and is thus application dependent, so be consistent!The default for all values is 0.

The call to the geocoding service was aborted because no responsehas been received within the timeout argument of eitherthe geocoding class or, if specified, the method call.Some services are just consistently slow, and a higher timeoutmay be needed to use them.

Tidygeocoder v1.0.3 is released on CRAN! This release adds support for reverse geocoding (geocoding geographic coordinates) and 7 new geocoder services: OpenCage, HERE, Mapbox, MapQuest, TomTom, Bing, and ArcGIS. Refer to the geocoder services page for information on all the supported geocoder services.

To see all available results for these addresses, you will need to use mode to force single address (not batch) geocoding and limit > 1. The return_input argument (new in this release) has to be set to FALSE to allow limit to be set to a value other than 1. See the geocode() function documentation for details.

The difference is because the Census locator is based on TIGER street files, which is not as a complete a dataset as Google Streets has. So for any given road, the TIGER streets may have an address range of 1-1000 whereas in reality the range is updated with more houses, etc. Some roads may not even exist within the TIGER files.

The street segments in TIGER files may also be incomplete, so it may match halfway along the street segment associated with the address range, where in reality, and Google, the street may be much longer. So a halfway match for TIGER may be halfway along the range of addresses for this shortened segment, but in reality is located elsewhere when the segment is of actual length.

Google on the other hand, looks to have a variety of options in their geocoding service. I didn't find anything specific as to their data backing. However, I did find some stuff in their geocoding parameters. They have the following geocoder location types in their parameters.

google.maps.GeocoderLocationType.RANGE_INTERPOLATED indicates that thereturned result reflects an approximation (usually on a road)interpolated between two precise points (such as intersections).Interpolated results are generally returned when rooftop geocodes areunavailable for a street address.

So... It looks like Google collects data related to those types, and I would guess automatically tries each of the type as going from more precise to less precise in order to get a higher match percentage. I am sure if you want more precise details than what is available through the Google Maps developers FAQ about Google's geocoding, you could send them an e-mail.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages