diff options
Diffstat (limited to 'chimere/utils.py')
| -rw-r--r-- | chimere/utils.py | 17 | 
1 files changed, 11 insertions, 6 deletions
| diff --git a/chimere/utils.py b/chimere/utils.py index 1877441..ed41a04 100644 --- a/chimere/utils.py +++ b/chimere/utils.py @@ -569,17 +569,22 @@ class GeoRSSManager(ImportManager):          if feed['bozo']:              return (0, 0, _(u"RSS feed is not well formed"))          for item in feed['items']: -            if "georss_point" not in item and 'georss_line' not in item: +            if "georss_point" not in item and 'georss_line' not in item \ +               and not ("geo_lat" in item and "geo_long" in item):                  continue              cls = None              dct = {'origin':self.importer_instance.origin,                     'license':self.importer_instance.license} -            if 'georss_point' in item: +            if 'georss_point' in item or "geo_lat" in item:                  cls = Marker -                try: -                    y, x = item['georss_point'].split(' ') -                except ValueError: -                    continue +                if 'georss_point' in item: +                    try: +                        y, x = item['georss_point'].split(' ') +                    except ValueError: +                        continue +                else: +                    y = item['geo_lat'] +                    x = item['geo_long']                  dct['point'] = 'SRID=4326;POINT(%s %s)' % (x, y)                  for k in ['description', 'summary', 'value']:                      if k in item: | 
