Extracting OpenStreetMap Data in RapidMiner

A few weeks ago I wanted to play with the Enrich by Webservice operator. The operator is part of the RapidMiner Web Mining extension and is accessible through the Marketplace. I wanted to do reverse lookups based on latitude and longitude. In my searching I came across this post on how to do it using XPath and via Google. That post was most informative and I used it as a starting point for extracting OpenStreetMap data in RapidMiner.

Why OSM? OSM is an open source database of Geographic Inforation Systems (GIS) and is rich with data. Plus, it’s a bit easier to use than Google.

After a few minutes of tinkering, I was successful. I built a process to go out to the USGS Eartquake site, grab the current CSV, load it, and then do a reverse lookup using the latitude and longitude. The process then creates a column with the country via the XPath of //reversegeocode/addressparts/country/text().”

Here’s what the process looks like:


and the results:osmresultsExtracting OpenStreetMap Data in RapidMiner Process

I exported the example process and zipped it up. You can download it here! Make sure to check out my other Geospatial tutorials in RapidMiner by visiting my Tutorials page!