53 Million New POIs
Last month, ThinkGeo Cloud added 53 million new Points of Interest (POIs)—including schools, businesses, hospitals, religious organizations, landmarks, mountain peaks, and more. Sourced from the Overture Maps Foundation’s Places theme, these POIs represent a conflation of data from both Meta and Microsoft.
This new dataset significantly enhances ThinkGeo Cloud’s geocoding and reverse geocoding capabilities. In this post, we’ll show you how to explore the data and integrate it into your applications.
Tip
To get your own ThinkGeo Cloud api keys, sign up here you will receive an email with your api keys and links to the Cloud Quickstart Guide.
See It In Action!
The ‘Find Nearby Places’ online sample shows the reverse geocode functionality using the standard dataset as well as the new Overture Places data.
The simplest way to see the new Overture data in action is to head over to the 'Find Nearby Places' Online Sample and click anywhere on the map. This will trigger an api call to the reverse-geocode endpoint and return all nearby addresses and POIs. Toggling the 'Include Overture Places' checkbox will show you which data is available by default and the additional 53 million data points available when setting the IncludeOverturePlaces parameter to true.
While reverse geocoding is helpful to find all locations near a given point, if you would rather find an address or POI by name, check out the Geocoding Online Sample. Just type in an address or name of the location you’re searching for. This will trigger an api call to the geocode endpoint. Note: you will need to be zoomed into a state-wide area before you’re able to check the ‘Include Overture Places’ checkbox on this sample.
Samples and Code Walkthrough
You can quickly explore the online samples above, but most developers prefer to look under the hood and see the code. Check out the links below to see how to use ThinkGeo Cloud in your applications:
Javascript API Sample Code and Quickstarts - Gitlab repo where you can download sample code for accessing cloud functionality via the Javascript API and view Quickstart guides.
.NET API Sample Code and Quickstarts - Gitlab repo where you can download sample code for accessing cloud functionality via the .NET API and view Quickstart guides.
REST API Swagger Docs - If you want to use the REST api to work directly with ThinkGeo cloud, the Swagger docs are your first stop to see documentation on all the api calls and parameters. There’s even a handy ‘Try it out’ button on each endpoint that allows you to test with your own data. You can also use a tool like Postman or any programming language to directly call the REST api endpoints.
In the code snippets below, we’ll demonstrate how to make a reverse geocode call to find nearby addresses and POIs (including the new Overture Places dataset) This first code shows how to accomplish this using the ReverseGeocodingClient from the Javascript Api:
const reverseGeocode = (coordinate, flag, includeOverturePlaces) => {
let opts = {
srid: 3857,
searchRadius: 500,
maxResults: 500,
verboseResults: true,
includeOverturePlaces: includeOverturePlaces,
};
const callback = (status, res) => {
// add your logic to display results.
}
// Make the call to ThinkGeo Cloud using the reverseGeocodingClient.
reverseGeocodingClient.searchPlaceByPoint(coordinate[1], coordinate[0], callback, opts);
If you’re working in C#, you can use the same ReverseGeocodingCloudClient - whether you’re using Desktop, Mobile or Web, adding this functionality to your application is simple!
// initialize the client with your clientId and clientSecret obtained from https://cloud.thinkgeo.com
ReverseGeocodingCloudClient reverseGeocodingCloudClient = new ReverseGeocodingCloudClient
{
ClientId = myClientId,
ClientSecret = myClientId,
};
// set up your options - full options can be found in the api docs.
var options = new CloudReverseGeocodingOptions();
options.IncludeOverturePlaces = true;
options.LocationCategories = CloudLocationCategories.All;
// Call the reverse geocode service and get the results.
CloudReverseGeocodingResult searchResult = await reverseGeocodingCloudClient.SearchPointAsync(lon, lat, pointProjectionInSrid, searchRadius, searchRadiusDistanceUnit, options);
Finally, if you’re working in a programming language other than c# - whether it’s Python, Java, PHP, Swift or Flutter - you can access all the Cloud functionality via the ThinkGeo Cloud REST Api. The sample below is using Python, but any other modern programming language can easily accomplish the same REST api call.
import http.client
conn = http.client.HTTPSConnection("cloud.thinkgeo.com")
payload = ''
headers = {
'Authorization': '••••••'
}
conn.request("GET", "/api/v1/location/reverse-geocode/33.1550,-96.84280?Proj4String=%252bproj%253dlonglat+%252bdatum%253dWGS84+%252bno_defs+&LocationCategories=All&verboseResults=true&IncludeOverturePlaces=true", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Summary
We hope today’s post has been helpful. If you have any questions or if you have a topic you would like to learn more about, please email sales@thinkgeo.com or schedule a meeting to talk in person.
About ThinkGeo
We are a GIS software company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, IT, and defense. We pride ourselves on our excellent service and transparency. ThinkGeo offers a variety of products and services to meet almost any GIS application need. We can even help you develop your next project - anywhere from a few hours of consulting to outsourcing an entire project. To learn more, email us at sales@thinkgeo.com, or call us direct at 1-214-449-0330.