From: Joel VanderWerf Date: 2008-06-24T06:12:02+09:00 Subject: Re: Reorder a XML file by distance from a location Johnny Repp wrote: > Hi > > I'm quite the newbie and I'm looking for some help. I need to do > something quick and it doesnt look so hard. > > I have this RSS file on my computer (below) and I need to produce a very > similar RSS file but with the items ordered according to the distance > from a given location using the latitude and longitude. I'm trying to > use rexml, but I can't really get anything good. I don't figure how > sorting works. > > Can someone give me some hints or advice? > > ====== > > > > something > myfeed > > > somewhere > http://link > niceplace > 45.6743546527171 > 130.7628651374888 > > > etc. > > > > ====== There's nothing to sort on until you compute distance. Start by googling for 'calculate distance from gps coordinates'. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407