PointAbout utilizes GeoRSS to create location-aware RSS feeds. You can find more detail on the GeoRSS spec here.
The best way to set a GeoRSS feed up is to have the mobile app (i.e., the iPhone app) send its lat + long coordinates to a server, and have the server crunch the data as follows:
Step 1: Have the server find all the data points near the user. The way you do this is by incrementing the long & lat by 0.1 in each direction. For example, if the phone sends you its location as “Latitude = 38.8977, Longitude = -77.0366″, then you can take plus/minus 0.1 on each of the values the phone gave you to give you about a 10 mile radius. (use something like where lat between currlat+.1, currlat-.1 and lon between currlon+.1, currlong-.1).
Step 2: Now that you have a ~10 mile radius bounded box, you want to take all the data points that fall within those lat & long values, and order them based on where the phone is. You can calculate distance in a langauge, sql, script, or compiled serverside language:
var R = 6371; // km
var dLat = (lat2-lat1).toRad();
var dLon = (lon2-lon1).toRad();
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.cos(lat1.toRad()) * Math.cos(lat2.toRad()) *
Math.sin(dLon/2) * Math.sin(dLon/2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
var d = R * c;
Then you want to return an ordered list of RSS items to the phone based on the calculations above. Every time the “update” button is pressed by the user, the location is re-sent to the server for a new list of RSS items to be passed back to the phone.
Here are some other resources for calculating distance and “nearest” items:
- How to calculate the distance between two points on the Earth
- SQL Server Zipcode Latitude/Longitude proximity distance search
Here’s what the finished app looks like (uses our new mashup product):




