Hi,

for several years, I'm maintaining some kind of locative information in a vocabulary (when I set up my site, either I wasn't aware of this fine module, or it din't exist yet); it's a simple hierarchy, starting with continents, broken down to geographical regions, countries, and districts.

Is there a way to

(a) somehow attach locative information from the "location" module to a term, or
(b) add locative information from the "location" module to nodes, based on the existing classification?

Maybe someone already did some work in this area?

Thanks for your thoughts & greetings, -asb

Comments

summit’s picture

Version: 5.x-2.7 » 6.x-3.x-dev
Priority: Minor » Normal

Hi,

+2 for taxonomy/location integration!

greetings,
Martijn

bdragon’s picture

Assigned: Unassigned » bdragon

Started on it, you should be able to set up and save locations on terms.
http://drupal.org/cvs?commit=192486

There's no code to acutally *display* them, still pondering the best way to go about that. A block perhaps?

summit’s picture

Hi, If the locations are duplicated in say a location vocabulary, with the hierarchy countries, provinces, places, adresses like location has. There all other sorts of modules to display them, like taxonomy_menu.
great you are working on this!
greetings,
Martijn

manuj_78’s picture

Actually..May I suggest that the address that is geocoded actually link to the taxonomy terms being created.
Or maybe the user can be given an option in the admin settings if they want the address to be lined directly to the taxonomy terms created by this module or just display the addres as it is.
Hope this makes sense

summit’s picture

Hi, I do not think that is the way to move forward. Location tables has its own centre in different modules.
Location has its own module set, and functionality and taxonomy has its own module set and functionality.
It would be absolutely great to have the location-hierarchy also been placed in a location-vocabulary. So an option when inserting, importing or via some module like feedapi importing locations, that than always also the location-vocabulary is being updated.
So location and taxonomy are then always in sinc.
Then the drupal moduleset as a whole can be used throughout the content. Nodes with location are then tagged with taxonomy and are able to be shown on maps and location-specific modules.
Greetings, Martijn

j0rd’s picture

Edit: Actually looked at the code & implementation. Changing my opinion.

I agree with Summit. I think the current implementation, while people might want this, is not the way we should be going about it. Perhaps both current implementation and the one Summit has proposed have their places though. I require the latter.

Current the implementation is to create your terms. Attach Locations to terms, then attach these terms to nodes.

What I would like to see, as I believe Summit is asking for, is that when you create a location on a node, that location information is mirrored into a Location Vocabulary.

Example. You create a node and attach a location of USA -> New York -> New York City , that would create the vocabulary terms attached the node in the same hierarchy using the human readable names as term_name.

This would open up the location data to other modules which deal with taxonomies like facetted search with taxonomy_facet

j0rd’s picture

Line 43 error. Need to pass by reference.

had to change

        location_save_locations(array(), array('genid' => 'taxonomy:'. $array['tid']));

to

        $foo = array();
        location_save_locations($foo, array('genid' => 'taxonomy:'. $array['tid']));

Might be my fault as I'm using the stable DRUPAL-6--3-1-RC1 branch of location and then simply checkout this module from DRUPAL-6--3

summit’s picture

Hi, I do not understand what this code-change has to do with new code for location/taxonomy integration?
and may be you can join forces with bdragon to get great code for location/taxonomy integration?
Greetings, Martijn

Anonymous’s picture

I am also interested in the ways taxonomy.module and location.module can work together. I've actually got my own way of approaching it that I'm not completely satisfied with either. I think the basic problem is that it's that we're wanting to add more information to a term, and there's no real great way to do this until Drupal 7.

I am using taxonomy.module with locations to manage a site's place name (toponym) vocabulary: names of countries, administrative divisions, cities, towns, landmarks, buildings. I leverage Geonames to retrieve latitude and longitude for places, but I can also input latitude and longitude by hand or by pointing to a spot on the map. The Geonames hierarchy of names isn't always important to me. It's simply a find the place I'm making a term for. I'm still choosing the name, parents, relations and synonyms for my term. I'm using these place terms to tag my content. Ultimately, I need to display a map of these terms as a block on the node.

All this is happening now in a module I've called placeterms, but I've not released because I didn't want to carelessly add to contrib module duplication and overlap. It's basically a slight variation on the method used for location_taxonomy, and I want to contribute a patch to improve this as soon as I've merged my code with it. It would be great if we could get Views 2 support for location_taxonomy, because then display can be handed off to Views 2 plugins, but right now I'm displaying a static Google map

Summit, j0rd and manuj_78 talk about synchronizing locations between nodes and terms in a vocabulary. This is an interesting problem, but it's probably outside the scope of location.module. Try looking at Node Auto Term module (NAT) which already synchronizes titles of nodes and terms in a vocabulary. Or Primary term module. These modules don't begin to solve the specific problem of synchronizing node locations and term locations, but I think they point to some other ideas.

summit’s picture

Hi,
I read al this of above post. Yes it's valuable but not for this discussion. Please file your module on contribute and start discussion about functionality there.

Isn't this request essential about to get locations into a location vocabulary? Something along the line of http://drupal.org/project/hierarchy and than automatically filled when a record is added to the location table.

My and I think others requirement is that when locations are filled (country, province, city, street), it would be great to have them mirrored to a location vocabulary which has this same hierarchy. This way the location information can also be used on taxonomy purposes, taxonomy menu, tagclouds, you name it.
It would be best of both worlds, so Yes +1 for location-taxonomy integration!!

Greetings,
Martijn

Anonymous’s picture

The only essential task to make taxonomy support locations is to add taxonomy fields (at a minimum latitude and longitude) to taxonomy terms.

I raised the points about my own module because it performs exactly the same tasks as what bdragon has done in location_taxonomy, but mine has additional features to grab information from the Geonames database. If I were obliged to use the hierarchy implied by the political and administrative structures of nations and cities, I would not be able to use this module.

Most users won't have permission to edit taxonomy terms without additional access control modules, so I think this is why people want to synchronize nodes and terms because it's easier to give people permissions to edit their own nodes. But how do you keep terms unique when multiple nodes all refer to "Paris" or "Beirut?" This sounds like the wrong way to address this problem.

summit’s picture

Hi, I disagree that the only essential task is to add at a minimum lat and lon to taxonomy terms. It is one of the things, not the only essential thing.
I think with enabling the location fields country, province, city in their own vocabulary controlled by location, would benefit a lot! Because then the whole taxonomy range of modules comes into location scope.
SO again +1 for location mirroring in taxonomy vocabulary!
Greetings,
Martijn

Anonymous’s picture

This needs to be more throughly understood.

If I'm developing a site for an Irish audience, I may need to merge the Northern Ireland counties that are legally part of the United Kingdom with the other counties from the Republic of Ireland. However, if I need to use these counties in a location taxonomy, I will be reverting the 6 counties in the north to a different position in the taxonomy (under United Kingdom), possibly breaking Views that filter by children of the "Ireland" term.

If I'm developing a site about global cities, I simply do not care that New York is in New York (state), Toronto is in Ontario or Tokyo is in Kantō. I might need region/province/state data fields on my nodes because this improves usability for users who are familiar with entering complete postal addresses. Users may have to stop and think when they see that the data input goes from City to Country. Transmitting all that information to a taxonomy hierarchy harms usability if I want my site to be structured according to broad geographic regions. Asia -> Tokyo, North America -> Toronto.

Creating the hierarchy of place names according to the data in a location field is potentially harmful to a site's architecture, and it would make this module unusable for me and I expect others. Split this issue apart from this one, make it optional and configurable, because it's not essential to adding location data to taxonomy terms. Don't bundle geographic names with geocoding. They're two separate problems.

summit’s picture

Hi Benjamin,
Adding to your second example. If you where developing a site about global cities. You definitively want to show the hierarchy and of course google map about it.
So it would be great if from America-New York- New York hierarchy with taxonomy menu you could come to the new-york node and on that node through location have the google map also shown. The combined functionality is just as it should be. Now I have to do both separately. Build a location-hierarchical vocabulary and plot locations through location.
See for example www.trekking-world.com/Nepal and http://www.trekking-world.com/regional/nepal/kathmanduvalley/kathmandu . It would be great if the vocabulary would fill automatically by plotting locations or entering locations through location module. Now I had to enter them by myself, while the information is allready in the locations table.

I disagree though it is potentially harmful! It is a choice and has nothing to do with harmful. You could for instance only show the country and city level if you like. I think it is still annoying to have location information through location, and than manually have to add the same information into a vocabulary. It would be great if location module could automatically fill a location-vocabulary with hierarchy and YES off course you as architect of the site could choose to use it or not. It has nothing to do with harmful in my opinion.

Greetings, Martijn

yesct’s picture

yesct’s picture

marked #335754: Location-Taxonomy integration question as a duplicate of this issue. (it suggests a starting point in the place module)

scottatdrake’s picture

Subscribing. I've been wrestling with location vs taxonomy as well.

yesct’s picture

goron’s picture

subscribing. I've been wondering what to do about this too.

Anonymous’s picture

Status: Active » Reviewed & tested by the community

I've been using location_taxonomy.module for over 1 month now, and it works very well. I think this issue can be closed and new bug reports or feature requests can be opened.

j0rd’s picture

I'm still with Summit on this one and I do not believe our concerns / features have been addressed with the current implementation. Please correct me if I'm wrong.

We're looking for duplicate location hierarchy in taxonomy, not attach locations to taxonomy terms.

yesct’s picture

maybe the one part can be committed and a different issue can be opened for the other?

zio’s picture

Issue tags: +location bdragon check

subscribe for duplicate location hierarchy in taxonomy

MattDrupalee’s picture

+1 on this location - taxonomy integration subject!

momper’s picture

subscribing

andrewsuth’s picture

I'm so glad this idea was proposed. I was starting to go a little crazy with displaying nodes based on Location using manually created pages with location URL's..

@bangpound: I see the Location options now appearing in Taxonomy when I am editing a new vocabulary. How are you using this new functionality?

I was looking at creating taxonomy terms for country, region and city - and using Location to locate each one of them. Then when a node is assigned a CCK Location (country, region, city and street), I can then take advantage of the mapping capabilities as well as the new location taxonomy structure.

I can see this method making my life a lot easier; especially when I can use taxonomy to list nodes rather than a complex view using the Location module and fiddly URL's.

Anonymous’s picture

Andrewsuth:

I think this issue has become overloaded with chat. My comments at #9 and #13 are still accurate. I'll likely release the module I've made in a few weeks when my project is done.

goron’s picture

bangpound, please let us know when you release this module. It will be very useful.

Anonymous’s picture

goron:

I'm not comfortable releasing the module until #429548: Add taxonomy term Views support for the location module is reviewed and committed. Are you in a position to review it?

goron’s picture

pangbound:

unfortunately I'm not...

wilgrace’s picture

subscribing

Yorgg’s picture

subscribing also

socialnicheguru’s picture

I am unclear.

does this patch allow me to add location information to any taxonomy term?

Then an application is to come up with a vocabulary like state and attach location information to each term like CA?
If so, will this be automatic or do I have to input the terms and location information ahead of time.

I am a little confused.

Thanks,
Chris

schvili’s picture

subscribing

ramotowski’s picture

subscribing

summit’s picture

Still wanting the combination of taxonomy and location the other way around, so that location fields filling: country, province, city etc.. are put in a vocabulary with hierarchy country-province-city..
Thanks a lot in advance for considering this still.

greetings, Martijn

obiwankaynobi’s picture

subscribing

sadist’s picture

subscribe to this useful feature!

browlands’s picture

eagerly subscribing

summit’s picture

@bangpound it seems patch for views is working, see: http://drupal.org/node/429548#comment-2328290 to get it right is always difficult with new views items, but it is working I think.
Could you consider now making the patch to get the interaction with location data and taxonomy vocabulary like say regional?

thanks a lot in advance for your reply!

greeetings,
Martijn

cdrichet’s picture

subscribing

summit’s picture

Hi,
May be the path is to integrate Location and http://drupal.org/project/geotaxonomy ??

Greetings,
Martijn

mayerwin’s picture

Priority: Normal » Critical

Subscribed

locomo’s picture

subscribing

Golem07’s picture

subscribing. I am with Summit on this one. A desperately needed feature.

kobnim’s picture

subscribing

homeshop’s picture

subscribing. It would be great :)

asb’s picture

Category: support » feature
Priority: Critical » Normal

Could somone please summarize the status of this issue?

After posting this almost two years ago as a support request for Drupal 5.x, it went de facto into a feature request for the D6 version (fixing the category with this post). In last April, bangpound started to work on this issue and mentioned some open conceptual questions (#9); in #11, bangpound explained his approach more in detail, and one month later he set the status to "reviewed & tested by the community" (#20).

Again one month later, in July 2009, bangpound mentioned the issue #429548: Add taxonomy term Views support for the location module as a showstopper for his patch (#29); this issue is currently still marked as "unassigned" and "needs review", even though Summit reported success with the patch in January 2009 (#41). After this I'm lost.

Questions: Is there something that needs to be tested, or is 6.x-3.x-dev ready for production use? Since the last stable version of the 'Location' module - 6.x-3.0 - was released on 12th December 2008 (!): what halts a new release? In the issue queue I'm seeing 5 critical issues for 6.x-3.0 and another 5 critical issues for 6.x-3.x-dev, 34 'closed' and none 'fixed'; do these remaining issues need to be fixed before a new release could be made, or is it safe to use the dev release anyway?

Thanks & greetings,
-asb

PS: Also setting the priority back to "normal" since this issue shouldn't negatively affect the functionality of the 'Location' module.

Anonymous’s picture

This issue is fixed. The code works as described. It's already been committed. It may not suit everyone's needs, but there are also other options like geo taxonomy and feeds.

In comment #29 I mentioned a separate module that I've developed that basically imports geonames places and makes terms. It's imperfect and unfinished, though it does things geo taxonomy doesn't. I wasn't going to release that until I could get #429548: Add taxonomy term Views support for the location module reviewed, but I suspect it's not really worth using in light of what can be done with geo taxonomy right now.

asb’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Hi bangpound,

thanks for the update. I exported a vocabulary, imported it in my sandbox, downloaded location 6.x-3.x-dev and could enable location features on the vocabulary page (still have to figure out how to enter data, but that's another story).

Closing this issue and requesting a new stable (non-dev) release of the 'location' module ;)

Thanks & greetings, -asb

toitimhcm’s picture

Think about this:
1 - attach location into node, when create node, node location insert data into location table.
2 - debug it. you should have country, provice, city.
3 - think about create taxonomy function (taxonomy module).
4. - check data before create taxonomy (duplicate check) & enjoy it.

Stomper’s picture

Would it possible to capitalize on the Hierarchical Select module? The module can allow a USA-New York-NYC selection by forcing the user to select from the deepest level.

gman_’s picture

Assigned: bdragon » Unassigned

It may be true that you can add location coordinates to taxonomy terms, summits idea that I am very much behind has not, and that is to synchronize or coordinate location data with taxonomy hierarchy terms.

http://drupal.org/node/260726#comment-2756350 - bangpound mentions he created a module that imports geonames places and makes them terms. This is exactly what I am looking for, except I will use location & gmaps data and not geonames data. I would really love it if bangpound shared this code, no matter how incomplete it is as it would be a great jumping off point to automating the synchronization of location data and taxonomy terms.

Digital Storm’s picture

I, like Summit, am also very interested in having a taxonomy hierarchy generated automatically from the location data. Find it surprising that there are not more of us. Subscribing.

summit’s picture

Hi, filed a new issue to get this other way integration of location/taxonomy usage: http://drupal.org/node/1094320
greetings, Martijn

Stomper’s picture

Thanks, Summit.

I currently have locations in a taxonomy powered by Hierarchical Select module. It would be nice to be able to tie the locations with the Location module and then import than via Taxonomy CSV.

javdich’s picture

subscribing

Louis Bob’s picture

Any news on that topic?

khan2ims’s picture

Location taxonomize module might be helpful here
http://drupal.org/project/location_taxonomize

asb’s picture

This issue is still active von 6.x-3.x-dev, 'location_taxonomize' is D7 only.