Street Address

Hi there,

I have lat and long figures which I converted to coordinates using nodes from the Palladian suite.

Can someone let me know if there is a way to get street addresses from the coordinates and what nodes I will need to use?

Thank you.

Hi ViTLe,

I haven’t tried it, but did you have a look at the ReverseLocationLookup Node?
If that doesn’t work you could always use one of the big map provider api´s to do a reverse lookup
For example GoogleMaps.

Best Regards,

Paul

3 Likes

Hi @ViTLe

As @goodvirus suggested, Palladian provides a set of nodes for this kind of tasks. I’m far from being a specialist but I just tried them a bit to generate addresses from lat+long coordinates based on the following workflow example I built:

To get it to run, you would need to go to Preferences → Palladian → Location Extractor

as follows:



As shown above, you will need to create too your own account at www.geonames.org to have access from KNIME to their geographical database. Be aware that at a given stage of the account creation, you will get an email to validate your geonames account creation.

Please be aware too that this service is free but limited in the whole maximum amount of bulk queries you can do per day and per hour. It seems to be limited to 30,000 REST request/day and 2,000 REST requests/hour. Keep in mind that in your case a Lat+Long request may generate several REST request because it is done based on a minimum radius of 1 Km.

I had fun trying these nodes and sharing the above experience but as I said I’m far from being a specialist in this subject, so surelly others will provide better help :slightly_smiling_face:

The minimalist workflow is here below:

20220111 Pikairos Street Address.knwf (508.6 KB)

Nevertheless hope it helps :slight_smile:

Kind regards,

Ael

16 Likes

@aworker Great tutorial, I’ll definitely keep this as a bookmark! :+1:

3 Likes

Some time ago there was a similiar request about mapping coordinates to ground based information find out the "ground" based on given coordinates (e.g. car road, train track, bicycle path, forest, ...)
There the focus was just on understanding the objects at the given point.
Maybe that contains some more food for thought.

2 Likes

@ViTLe you should keep in mind that when you use external services to check geo references you reveal to a third party what you do. Someone on the server might register a pattern. If you just test something this might not be a problem.

If you check large numbers of for example customer data or explore new opportunities for businesses you should keep in mind that even if you would not send very specific data your requests might show a pattern along with your IP or domain (for example which area you are exploring). Typically request get logged on such servers.

Not to spoil the fun with geo, just a note to keep these aspects in mind :slight_smile:

5 Likes

Hi @aworker thank you for this awesome workflow, I am going to try it out but I wanted to ask, wth the max num of bulk requests, what happens when I hit that limit? Does it simply not action it?

The work I am doing does back 12 months so there is tens of thousands of rows of data so it might hit that limit.

@mlauber71 thank you for this tip. I will have to mention this to my manager as the work we do confidential and they can decide if they think it’s worth it or not.

@knimediger thank you for the source of information. Good to have more knowledge with Knime always.

@goodvirus I haven’t tried this node yet actually. So far I have only tried the ‘Latitude/Longitude to Coordinate’ note but I am about to look into the node you suggested, thank you :slight_smile:

Hi @ViTLe

It just fails and from there you need to wait for an 1 hour before being able to send a request again. I’m completing the workflow to make it more robust and resilient to failure. I’ll be back soon :wink:

Best

Ael

2 Likes

Hi everyone, thanks @aworker for the workflow, it was brilliant and allowed me to get some street names. The results were good but I needed more specific addresses, like down to street number etc.

I did some research and found I could use an API (that was given to me) and the GET Request node to retrieve the data.

I used this: https://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat,long + "&key= and the string manipulation to create the URL and from GET Request, got some JSON data so I used and JSON to XML and a bunch of XPath to extract the data I needed and was able to grab more specific addresses.

Incase this helps anyone else to retrieve addresses from lat & long


If you want to do the opposite, where you want lat & long from an address: Google had this URL:

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY

I hope this helps someone else!

I love the Knime Community, so many super smart and nice people so I wanted to return the favour/pay it forward.

Thanks everyone!

3 Likes

Hi @ViTLe

Thanks a lot for your so kind and nice comments. It is true, the KNIME community is great at helping each other. Thanks too for contributing to the forum with your awesome Google example :slight_smile: :+1: !

I have completed the initial workflow based on Palladian nodes creating eventually a more complex and robust version. It handles the problem of bulk submission by first trying to retrieve all the LAT-LON addresses from a lookup file provided by geonames.com. If the LAT-LON locations are not present, then it uses the Palladian nodes but this time taking care of not blocking the server with too often requests.

I believe this workflow can be used as an example of how to deal with bulk API requests that are limited in time. Maybe you will need to deal with this same problem when accessing www.googleapis.com/maps or any other API service.

The workflow is available from the KNIME hub at the following link:

Thanks and kudos to the Palladian Team for making available such a great plugin.

Good luck @ViTLe with your project which sounds really interesting.

Best wishes,

Ael

5 Likes

@aworker Thank you for this! This is really good for when I don’t have an API key to use, in my case luckily I had one.

1 Like

Hi @ViTLe

Thanks for your kind comments ! You are right lol, your solution is really a very good one in this case. Do you think you could post it here as a workflow ? I guess many forum members would be happy to use it. I believe it is great.

Best wishes,

Ael

1 Like

Where did you get the allcountries file to download? I saw no download link.
br

Hi @Daniel_Weikert

This is explain in the workflow and in the KNIME hub repository:

The full content file is called “allCountries.txt” and can be downloaded from GeoNames as a zipped file.

Best

Ael

@aworker Hi Ael, definitely! I can’t send the actual workflow because it has the unique key in it which is linked to an actual paid account but I can share the what nodes I used in the workflow and also how the Google link which is public for everyone. That link has one for lat and long and also has a different one for actual addresses if the user wants to do the reverse (address to get lat and long).

Getting the address actually stops at the Pivoting, the rest of the workflow was just formatting the way and order I wanted to look at the address.


I really hope this helps someone as a way to return the favour!

2 Likes

It’s great to see that aside G*** map also other data sources come to your mind when dealing with geo data as soon as the restricted universe which you get for paying with data and sometimes also money is not good enough.

Maybe it’s worth to understand that OpenStreetMap (OSM) is really worth not only a try. As a crowd sourced project with a long history it offers you a lot of geographic data of high accuracy.
Yes, it’s mainly data. Maps are just one simple way of displaying parts of it.
The main distinction with other commercial geo data sources is that OSM is open data. It grants you full access to the data (of course within the limits of the underlying ODb licence). You can both retrieve data and also enter or correct data.

One hint: In case you create a huge volume of request to any of the APIs around OSM you might consider to host OSM on your own server(s) Acceptable Use Policy - OpenStreetMap Wiki

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.