Many people have asked how they can extract data from the OpenStreetMap. Here is an example of how I got some locations I wanted out of the system.
I use PHP in my example but I geuss the method is transferrable. This solution is not the most ideal one but it gets the job done. I will update this example as I see fit to make it as good as possible. If you find a better way to do these things, please leave a comment.
The php and osm files used in this example can be found here (osm_example.rar).
There are many different sized files available at multiple sources but the ting is those files are huge so handling them requires good knowledge of the content of the file (because you can’t open it with a text editor and check it) but also massive, state-of-the-art hardware.
But since I know what I’m looking for and where to get it, I can export custom .osm file from OpenStreetMap.
First go to OpenStreetMap and hit the Export link at the top of the screen. Zoom and pan the map to select the area you want your information from. The maximum ammount of nodes the exported data can have is 50,000 so zoom close.
Select OpenStreetMap XML Data as the format you want to export and hit the Export-button. This should prompt a window where you can save the map.osm file containing the data of the selected area.
So now we have the file. Let’s jump to the .php-file. Read More…
As mobility has become the thing in IT sector, users of IT are mobile as well. This can be seen as a rise in the use of geographic information services. Earlier this week Apple published their own map application for iOS. Now that everyone has their maps set we can set our eyes to the horizon and see where the world is going with all this?
Location-awareness seems to be the hot word today. Of course many location-aware applications are in the beginning of their stories if even that. Location-aware advertising is something everyone must have heard of but that’s only taking baby steps as well.
Location-aware services are everywhere. You can add geographic information into your Facebook updates, Wikipedia entries, Instagram photos, photos you take with your camera (a real camera, not a phone) and many others. Even Google search gives you results according your location.
Foursquare and Google Places are just the most obvious examples of how to use geographical data. They place points of interests, like bars and movie theatres on map for people to discover. Tons of small startups have risen around this core idea of location-based social media. Most of these startups can be divided into two groups. On the other group are services like Foursquare which create a real world gaming platforms with their check-in systems. On the other group are local chat services with wich you can easily connect to people nearby without actually having to meet them. Isn’t it nice that you can ask what’s the atmosphere at the corner bar instead of going out and finding out yourself?
Most of these startups won’t live longer than a year or two leaving only few big ones after them. The small ones know that too. What happened with social media, is now happening to local social media. Don’t get me wrong, the small ones might set the direction for the bigger ones we go into the future with.
The most used location-based service is so-called business locator. Most maps offer this solution as a build in feature. A business locator shows you local businesses as points of interest. These POIs are based on your location, search phrase or personal preferences. The business locator is extremely easy to build if you happen to have database full of businesses’ addresses or locations. Almost every location-based service uses business locator in some way.
The Internet is full of services where you can find and compare products and prices in web shops. I have done some research in the Internet but I haven’t found product locator services that can tell you where to find a product you are looking for. That is unless the product is on an ad that pops out the moment you hit the search button. There aren’t any useful product locators that would show the product on the map of your mobile device.
Why am I looking for such service? You can see the stores on the phone’s map app but you cannot know what you can find at these stores. Neither can you say where is the closest place you can find a screwdriver in the middle of Helsinki. To know that you must have been in that store before. Wouldn’t it be nice if you could type in a list of products you want and when you are near to that product your phone tells you to stop by and get it because it’s less expensive here that at the place you usually do your groceries? I can easily see that business locators turn into product locators in the near future.
The same will happen to local news and media. GeoRSS has been around for years already but not too many media house uses the advantages it offers. That might be because people are widely unfamiliar with GeoRSS and location-based services in general.
We will see a lot of location-based services in the near future. Most of these services will be copies of each others and many will die out when the location-based bubble pops. But after that we will have a world more local that the one we live in today.