I have an RSS feed coming into my site that includes GPS coordinates. The Lat and Long coordinates are on separate lines....can this module be used to somehow grab each line from the incoming RSS and allocate them to location fields?

My goal is to then place those locations onto a GMap.

Comments

alex_b’s picture

Status: Active » Postponed (maintainer needs more info)

What geo module are you using? There is mapping support for http://drupal.org/project/location

mdowsett’s picture

yes, the location module is what I plan on using...I didn't know there were others!

The 'guts' of the incoming feed look like this:
Title: "80 Tradewinds Pl, Kitchener, Ontario, Canada"
Body:

<div>goflyxc is at 80 Tradewinds Pl, Kitchener, Ontario, Canada
          <div class="geo">geo coordinates:
            <abbr class="latitude" title="43.4197120667">43.4197120667</abbr>
            <abbr class="longitude" title="-80.5495071411">-80.5495071411</abbr>
          </div>
</div>

It gives me hope that the data does have classes around them....but I don't do much coding at all so don't know where to go from here.

alex_b’s picture

If you have problems finding the geo data on the mapper interface, you're looking at a parser issue. It's the parser's responsibility to expose feed data to the rest of the processing stack.

mdowsett’s picture

OK. I'm sure I have something(s) configured wrong...hopefully you can and will steer me in the right direction.

Here's my set up....I chose to use SimplePie as the parser (no real reason so let me know if there is benefit to using the Common Syndication option).

I have a Feed content type. I have it set:
- enabled as a "feed content type"
- SimplePie is enabled
- Common Syndication is disabled
- enabled to 'create nodes from feed items'
- creates 'location' (that's my feed item content-type I created)
* if I click on the "Maps" tab on this content type, there no location fields to map

I created the Location content-type. I have it set:
- DISabled as a "feed content type"
- SimplePie is enabled
- Common Syndication is disabled
- 'create nodes from feed items' is disabled.
* there is no "Maps" tab to configure the mappings of this content-type

I've brought in some Feeds and it has created some Locations.

When I look at a Feed-node, there IS a "Maps" tab to configure...and it does have location fields to map. But it doesn't make sense to me to have to map each Feed-node's settings.

When I look at a Location-node, there is NO "Maps" tab to configure.

So....the only place where I can currently configure the "Maps" settings to location-fields is on the Feed-nodes...this can't be right...is it?

It would make sense to me that you'd have to configure the Location-content-type's Maps settings to the proper location fields....but how can you do that before the feeds actually come in?! Know what I mean...it's kinda the cart-before-the-horse scenerio isn't it?

Or I am severely confused here? :)

mdowsett’s picture

Maybe I'm just thinking out loud here....I think it may be working (as I have it set up above).

So do I have to
- create the feed
- refresh the feed (which it does automatically upon creation)
- manually map the fields on each Feed that comes in

Because what I just did was just that on an active feed and brought in a new Location-feed-item and it did parse the location properly.

I'm glad it works....but I have to do that manually for every feed that comes in?!? I can see how it can't be done til you get sample data in....but I plan on having hundreds or hopefully thousands of feeds coming in and can't expect the users to do what I detailed here....and it'd be an administrative nightmare for an admin to keep on top of it.

I'm hoping I have things configured wrong...

Yorgg’s picture

I am looking for similar thing. Perhaps the mapper box should be visible in the feed list /?q=admin/content/feed
instead of a per-feed right? That would save all the trouble to manually map every single feed.

alex_b’s picture

Title: incoming feed to location data » Aggregating lat/lon location data
Version: 6.x-1.0-beta4 » 6.x-2.x-dev
Category: feature » support

#5 / #6: configure on admin/content/node-type/[type]/map and have a look at hook_feedapi_mapper_elements(). For parsing Geo RSS feeds use the SimplePie Parser module that ships w/ FeedAPI . #2 - your feed doesn't look like GeoRSS though. In such cases I sometimes wind up writing my own parser by forking parser_common_syndication or by using feedapi_eparser.