Geotagging Web Pages and RSS Feeds
My previous article discussed how geolocation by IP address enables applications and Web sites to determine users' locations automatically in order to provide specific location-based services to users and members of an on-line community. In this article, we present various methods by which Web sites can provide their geographic locations to static pages and syndicated feeds, in the form of meta information or geotags. Put another way, geolocation by IP address is the technique a Web site uses to determine where users are located; geotagging is the technique users employ to find out where a Web site is located.
Geotags typically locate the Web site's principle location on the Earth. This information can include latitude and longitude information for exact locations or simply city, region and country information for general locations. Web services, applications and users then can query this information to obtain directions (how to get from here to there), locality (what's near there) or context (where was this article written). Geotags differ from a simple address in that they usually are encoded in metadata and are not visible as part of the Web page. Furthermore, by following a standard, other services easily and reliably can find these geotags. Various semantic Web projects still are solidifying geospatial tagging standards, but several techniques already have become common and supported. This article presents these current techniques.
Providing a geographic location is beneficial particularly for retail and service businesses, tourist attractions and entertainment venues. Geographic link directories, such as A2B and Multimap, can index these services by location and allow users to search geographically as well as by service type. Currently, many of these services limit users in their selection of available services. But, it would be possible to allow for more complex queries, such as searching for "Italian restaurants within 2 miles of downtown Arlington, Virginia". Or, when using automatic geolocation, one could ask for "directions from my current location to the nearest theater".
Current location-based services rely on the Web site administrator registering with an on-line index and specifying its location. Some of these services charge a fee, and many are not used commonly, nor are they cross-referenced. Google is now beta-testing Google Local, a free engine that allows users to search for location-based services using complex queries such as the examples above. Unfortunately, Google Local probably uses a form of scraping instead of meta information, considering that the 2002 Google Programming Contest winner's entry, by Daniel Egnor, is a geographic search which: "includes a geocoder (... to turn street addresses into latitude/longitude coordinates), a simple indexer that looks for addresses and keywords in documents, and a query engine to search for documents matching certain keywords that also contain addresses within a certain distance of a target location". Still, Google Local is an excellent example of how providing geographic information on a Web site greatly can enhance its visibility and usefulness to potential customers and users.
Geographic metadata also is useful for bloggers and photographers. Traveling writers, travel writers and reviewers can give context to their articles by supplying specific geographic information about where they are writing from or where the business they are reviewing is located. Photographers can provide viewers with information necessary for better understanding the photograph by informing them of where it was taken. Environmental services are now beginning to offer syndication feeds for weather and earthquakes. By geotagging these feeds, aggregators could sort, search and display information by region and location. As a result, users would gain a better picture of the current events happening in their areas.
By embedding a geographic location in the metadata of the Web site, applications and Web-based services quickly and reliably can determine the site's location relative to search criteria. Using metadata prevents the confusion of an automated search bot having to determine the location from the site's text. The rest of this article discusses the techniques used for embedding geographic information in your Web site or syndicated feed.
Special Reports: DevOps
Have projects in development that need help? Have a great development operation in place that can ALWAYS be better? Regardless of where you are in your DevOps process, Linux Journal can help!
With deep focus on Collaborative Development, Continuous Testing and Release & Deployment, we offer here the DEFINITIVE DevOps for Dummies, a mobile Application Development Primer, advice & help from the experts, plus a host of other books, videos, podcasts and more. All free with a quick, one-time registration. Start browsing now...
- The Ubuntu Conspiracy
- Science on Android
- A First Look at IBM's New Linux Servers
- Vigilante Malware
- Disney's Linux Light Bulbs (Not a "Luxo Jr." Reboot)
- Vagrant Simplified
- Bluetooth Hacks
- System Status as SMS Text Messages
- Libreboot on an X60, Part I: the Setup
- October 2015 Issue of Linux Journal: Raspberry Pi