It would be very cool if you could include an auto name lookup through, for instance, the Google Maps API. A term that has no geocoordinates but is in a Geo Taxonomy should have it's name looked up and the coordinates stored. I think I can write something like this for GM API. But I'd like to hear from the maintainers if this is a functionality they'd like to include in this module. To make this as elegant as possible it would have to hook into another module for Google Maps API key configuration. And the term admin form validation would need some kind of ui to confirm the lookup before saving in case of ambiguous lookups.

CommentFileSizeAuthor
#10 taxonomy_geocoder.tar_.gz6.66 KBtivv

Comments

alex_b’s picture

This would be a job for extractor module: http://drupal.org/project/extractor

Once extractor supports Google name lookups, geotaxonomy can use the extractor API to look up geo coordinates for term names.

basvredeling’s picture

Actually I think this should be a part of geotaxonomy. From what I understand, extractor merely functions as and extraction point of term names from bodies of text. The geo-encoding is done by geotaxonomy.
Maybe I didn't explain what I'd like to do:

Let's say you've got a term with NO geocoordinates. Now you could enter the coordinates manually OR you could do a lookup on Google Maps API to automatically retrieve the geocoordinates. This is geo-encoding and needs to be done by either geotaxonomy itself or by another module hooking into geotaxonomy.

alex_b’s picture

Ya, I see.

You may be able to use extractor's API to pass the geo term to the Google Maps API and get coordinates for it. Will need integration between Extractor and Google Maps API. May need some modifications to extractor. Moving this functionality to extractor would have the benefit of better reusability though.

But honestly, I'd need some better knowledge of the Google Maps API to give a better answer.

crea’s picture

That would be very cool feature cause lots of people use geo vocabs (regions, cities. etc).
By the way, wouldn't it be cool also to get polygonal geo information for a city, instead of centered dot ? Does Google Maps API support that ?

basvredeling’s picture

I'm inclined to think Google Maps API support something like that. However, it's not something I'm ready to implement. Would have some serious implications for the admin interface of geo tax terms.

crea’s picture

Well even basic geo lookup would be very nice to have! I have a vocabulary with ~11000 geolocations mostly in russian. I can't imagine assigning that geo information manually for the whole vocab.
I think best way would be to perform batch geo lookup, then let admin review lookup results in a table. Thus admin would be able to fill in geo info when auto-lookup could not find anything suitable and also to fix wrong looked up locations (you know, some locations can have similar names).

basvredeling’s picture

11000 is a lot of terms. You run into another problem there. The term extractor is hardcoded to process no more then 2000 terms. Check out this fix: http://drupal.org/node/751876
I also think this will negatively influence performance. But at least it's possible with the configurable term limit.

BenK’s picture

Subscribing...

tivv’s picture

Subscribing...

tivv’s picture

StatusFileSize
new6.66 KB

I've made a tiny module that adds a button to taxonomy term edit page. You can press the button to look up term coordinated with geocoder and fill longitude/lotitude