Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I had a similar question. Are we talking about lat/lon via georss, parsing tags that may have geographic information (city, state) and deriving lat/lon or extracting it out of the content itself (well, this is a bit tough, but possible)?
The second part such questions are even more interesting, after you get it out where do you put it (example: Location API)
Thank you for your suggestions geodaniel...very much appreciated...i am looking to extract text from the body and place it in the location "City" and "State" fields...is this possible?
It's not possible at the moment (as in there's not any code in FeedAPI to do it). I think it could be something others are interested in though. Out of interest, could you include some examples of the content you'd like to extract location information from? Is it the kind of content that comes out of news organisations that typically starts with the location, or content that just has locations mentioned throughout it?
I have a feeling Development Seed did some work on this kind of thing a couple of years back, but I can't find a reference to it at the moment.
I think I found a solution here http://drupal.org/node/309817 however, I lack the php skills to get started...any ideas on a starting point? Thanks! (and the location would be mentioned in it after "location:")
This suggestion may run afoul of the "you can make Drupal do anything!" mantra, but:
1. I too lack the PHP skills to work real Drupal-function magic; and
2. There's something to be said for not cramming 101 functions into a module -- FeedAPI is awesome, but complicated enough as it is.
I've been playing with Yahoo Pipes the last few days, and it really is a powerful and (relatively) easy tool for slicing and dicing feeds to get them the way you want them. It would be fairly easy to pull those location data points from the body and place them in their own RSS-item elements. And Feed Element Mapper can pull most any element into a CCK field or a Vocabulary.
I don't know if Feed Element Mapper plays nicely with Location Module fields, but it seems like that would be a much easier change to make than building in full-blown extraction/regular-expression tools into one of the FeedAPI modules.
@tks that sounds like a sensible way of doing this, and there are patches in the queue (see comment #5) that will allow for GeoRSS elements in feeds to be passed to Location module.
Hi, I understand you close this. But I would like to remark that I think (my humble opinion) location_feed_mapper is not working anymore after the security update.
thanks for building such great modules! greetings, Martijn
Comments
Comment #1
aron novakWhat do you mean exactly? The geographical location?
Comment #2
jamesJonas commentedI had a similar question. Are we talking about lat/lon via georss, parsing tags that may have geographic information (city, state) and deriving lat/lon or extracting it out of the content itself (well, this is a bit tough, but possible)?
The second part such questions are even more interesting, after you get it out where do you put it (example: Location API)
Comment #3
k.a.b. commentedyes, jamesJonas has clarified my goal...anyone know how I can achieve this functionality?
Comment #4
k.a.b. commentedany ideas?
Comment #5
geodaniel commentedYou may be interested in #228111: Add enclosure (and location) support to FeedAPI Drupal 6 and #265196: Support for the Location module which will allow mapping of GeoRSS information to Location module fields using the Feed API Mapper module. Is that what you were looking for, or were you more interested in extracting text from the body, finding a location in it and geocoding it?
Comment #6
geodaniel commentedComment #7
k.a.b. commentedThank you for your suggestions geodaniel...very much appreciated...i am looking to extract text from the body and place it in the location "City" and "State" fields...is this possible?
Comment #8
geodaniel commentedIt's not possible at the moment (as in there's not any code in FeedAPI to do it). I think it could be something others are interested in though. Out of interest, could you include some examples of the content you'd like to extract location information from? Is it the kind of content that comes out of news organisations that typically starts with the location, or content that just has locations mentioned throughout it?
I have a feeling Development Seed did some work on this kind of thing a couple of years back, but I can't find a reference to it at the moment.
Comment #9
geodaniel commentedAh, see http://www.developmentseed.org/blog/2007/nov/29/we-will-geocode-anything for the workflow they were using.
Comment #10
k.a.b. commentedI think I found a solution here http://drupal.org/node/309817 however, I lack the php skills to get started...any ideas on a starting point? Thanks! (and the location would be mentioned in it after "location:")
Comment #11
TKS commentedThis suggestion may run afoul of the "you can make Drupal do anything!" mantra, but:
1. I too lack the PHP skills to work real Drupal-function magic; and
2. There's something to be said for not cramming 101 functions into a module -- FeedAPI is awesome, but complicated enough as it is.
In any case, I *think* that you could do what you want with the Feed Element Mapper module and Yahoo Pipes.
I've been playing with Yahoo Pipes the last few days, and it really is a powerful and (relatively) easy tool for slicing and dicing feeds to get them the way you want them. It would be fairly easy to pull those location data points from the body and place them in their own RSS-item elements. And Feed Element Mapper can pull most any element into a CCK field or a Vocabulary.
I don't know if Feed Element Mapper plays nicely with Location Module fields, but it seems like that would be a much easier change to make than building in full-blown extraction/regular-expression tools into one of the FeedAPI modules.
Hope that helps...
Comment #12
geodaniel commented@tks that sounds like a sensible way of doing this, and there are patches in the queue (see comment #5) that will allow for GeoRSS elements in feeds to be passed to Location module.
Comment #13
summit commentedSubscribing, greetings, Martijn
Comment #14
AntiNSA commentedsubscribe
Comment #15
alex_b commentedClosing after an extended period of inactivity.
Comment #16
summit commentedHi, I understand you close this. But I would like to remark that I think (my humble opinion) location_feed_mapper is not working anymore after the security update.
thanks for building such great modules! greetings, Martijn