? PATCHES.txt
? feeds_georss_support.patch
Index: libraries/common_syndication_parser.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/libraries/common_syndication_parser.inc,v
retrieving revision 1.12
diff -u -p -r1.12 common_syndication_parser.inc
--- libraries/common_syndication_parser.inc	28 Apr 2010 20:30:07 -0000	1.12
+++ libraries/common_syndication_parser.inc	9 Aug 2010 20:48:05 -0000
@@ -94,6 +94,10 @@ function _parser_common_syndication_feed
 function _parser_common_syndication_atom10_parse($feed_XML) {
   $parsed_source = array();
 
+  $ns = array(
+    "georss" => "http://www.georss.org/georss",
+  );
+
   $base = (string) array_shift($feed_XML->xpath("@base"));
   if (!valid_url($base, TRUE)) {
     $base = FALSE;
@@ -112,6 +116,9 @@ function _parser_common_syndication_atom
   $parsed_source['items'] = array();
 
   foreach ($feed_XML->entry as $news) {
+
+    $georss = (array)$news->children($ns["georss"]);
+
     $original_url = NULL;
 
     $guid = !empty($news->id) ? "{$news->id}" : NULL;
@@ -123,6 +130,20 @@ function _parser_common_syndication_atom
 
     $additional_taxonomies = array();
 
+    $geoname = '';
+    if (isset($georss['featureName'])) {
+      $geoname = "{$georss['featureName']}";
+    }
+
+    if (isset($georss['point'])) {
+      $latlon = explode(' ', $georss['point']);
+      $lat = "{$latlon[0]}";
+      $lon = "{$latlon[1]}";
+      if (!$geoname) {
+        $geoname = $lat.' '.$lon;
+      }
+    }
+
     if (isset($news->category)) {
       $additional_taxonomies['ATOM Categories'] = array();
       $additional_taxonomies['ATOM Domains'] = array();
@@ -195,6 +216,18 @@ function _parser_common_syndication_atom
     else {
       $item['guid'] = $item['url'];
     }
+
+    $item['geolocations'] = array();
+    if ($lat && $lon) {
+      $item['geolocations'] = array(
+        array(
+          'name' => $geoname,
+          'lat' => $lat,
+          'lon' => $lon,
+        ),
+      );
+    }
+
     $item['tags'] = isset($additional_taxonomies['ATOM Categories']) ? $additional_taxonomies['ATOM Categories'] : array();
     $item['domains'] = isset($additional_taxonomies['ATOM Domains']) ? $additional_taxonomies['ATOM Domains'] : array();
     $parsed_source['items'][] = $item;
@@ -322,6 +355,7 @@ function _parser_common_syndication_RSS2
   $ns = array (
     "content" => "http://purl.org/rss/1.0/modules/content/",
      "dc" => "http://purl.org/dc/elements/1.1/",
+     "georss" => "http://www.georss.org/georss",
   );
 
   $parsed_source = array();
@@ -340,6 +374,7 @@ function _parser_common_syndication_RSS2
     if (version_compare(phpversion(), '5.1.2', '>')) {
       $content = (array)$news->children($ns["content"]);
       $dc      = (array)$news->children($ns["dc"]);
+      $georss = (array)$news->children($ns["georss"]);
     }
     $news = (array) $news;
     $news['category'] = $category;
@@ -379,8 +414,17 @@ function _parser_common_syndication_RSS2
       $guid = $original_url;
     }
 
-    if (isset($news['guid'])) {
-      $guid = "{$news['guid']}";
+    if (isset($georss['featureName'])) {
+      $geoname = "{$georss['featureName']}";
+    }
+
+    if (isset($georss['point'])) {
+      $latlon = explode(' ', $georss['point']);
+      $lat = "{$latlon[0]}";
+      $lon = "{$latlon[1]}";
+      if (!$geoname) {
+        $geoname = $lat.' '.$lon;
+      }
     }
 
     $additional_taxonomies = array();
@@ -413,6 +457,18 @@ function _parser_common_syndication_RSS2
     }
     $item['url'] = trim($original_url);
     $item['guid'] = $guid;
+
+    $item['geolocations'] = array();
+    if ($lat && $lon) {
+      $item['geolocations'] = array(
+        array(
+          'name' => $geoname,
+          'lat' => $lat,
+          'lon' => $lon,
+        ),
+      );
+    }
+
     $item['domains'] = $additional_taxonomies['RSS Domains'];
     $item['tags'] = $additional_taxonomies['RSS Categories'];
     $parsed_source['items'][] = $item;
Index: plugins/FeedsSyndicationParser.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feeds/plugins/FeedsSyndicationParser.inc,v
retrieving revision 1.14
diff -u -p -r1.14 FeedsSyndicationParser.inc
--- plugins/FeedsSyndicationParser.inc	29 Mar 2010 02:55:50 -0000	1.14
+++ plugins/FeedsSyndicationParser.inc	9 Aug 2010 20:48:06 -0000
@@ -59,6 +59,10 @@ class FeedsSyndicationParser extends Fee
         'name' => t('Categories'),
         'description' => t('An array of categories that have been assigned to the feed item.'),
       ),
+      'geolocations' => array(
+        'name' => t('Geo Locations'),
+        'description' => t('An array of geographic locations with a name and a position.'),
+      ),
      );
   }
 }
