Skip to content
Prev 11646 / 29559 Next

Help with GeoRSS

On Sun, May 8, 2011 at 6:45 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
Thanks Barry,
It does indeed work if I download the file a specify layer = 'georss'.

Michael

P.S. I was thinking that it might be possible to directly read the xml
file using library(XML) but it seems that it has to be saved to a file
this way as well....

library(XML)
library(rgdal)

xmlTest <- xmlTreeParse('http://earthquake.usgs.gov/earthquakes/catalogs/eqs1hour-M1.xml')

# this seems to be the part I need
xmlTest$doc$children$rss
# save the XML
saveXML(xmlTest$doc$children$rss, file='/Users/michael/Desktop/out.xml')
# get info
ogrInfo(dsn='/Users/michael/Desktop/out.xml',layer='georss')