I have a huge 200mg file of all the world regions countries cities etc from geonames.org I just need to convert it into the proper xml and import with the taxonomy xml import module.

I found a guy with a seemingly perfect solution but I cannot understand his method Taxonomy Terms-Bulk he has a simple perl script which does the conversion. If I can get this done there will be every possible combination of city state region country available in taxonomy so we can properly organize and geocode any node.

I dont know how to run the script. I looked through the code and could not find any area where you would add the path to the text file which needs to be converted. Im sure its something stupid and simple I am missing because I've never worked with pearl scripts. I figured trying to run this locally would be best as my text file is over 200 megs thats why I have installed Active Perl.

Can anyone give me a point in the right direction or help out?

I have attached his simple script which does the conversion to properly formated xml.

The text file can be downloaded here allCountries.zip Warning it's 161Megs.

CommentFileSizeAuthor
taxonomy_list2xml.pl_.txt1.07 KBMacronomicus

Comments

Macronomicus’s picture

Woops thats not the correct link to the text file! Here is the correct link earth-info (Warning the file is 220megs). Be sure to select the entire compressed countries file.

Im wondering if The GeoNames API for Drupal is a better solution for what im trying to do. I have been attempting to use taxonomy to browse our global club resorts there will ultimately be thousands of properties and hand coding all those taxonomies is out of the question.

Has anyone had any success with the geoNames api?

Macronomicus’s picture

Okay he said it doesn't work for hierarchies so thats a scrub. I will try to find someone who will rewrite it (anyone here willing to do it?), at the end of the day we only need one good file to handle most websites purposes.

I will post it up here if I can find a solution elsewhere.

summit’s picture

Hi,

Subscribing. I need the taxonomy of the world also.
I know there will be a place_taxonomy module available soon. May be good to get in contact with those guys from WSF (http://drupal.org/project/place). May be you can assist each other.
please keep me posted!

Greetings,
Martijn

Macronomicus’s picture

I have left a message over there, but no response as of yet.

I am probably going to create a job listing over in groups later this week. I need the whole location/place thing sorted asap. Of course, I will give out the taxonomy to whomever wants it once its created. Ill post back here with the progress.

summit’s picture

Great! Good luck with the job. Looking forward to your solution!
greetings,
Martijn

harrypark’s picture

subscribing

harrypark’s picture

subscribing

joeboris’s picture

Subscribing

Macronomicus’s picture

I should be posting the job soon ... Ive been insanely busy and wanted it to be written out properly first. I probably will wait until after I contact the location module and geonames module folks; as maybe we could just sponsor them with some cash, or whatnot.

Im thinking a combination of geonames and the up and coming location module revamp is the best direction to head. There is a lot of chatter about the forums and groups and it seems many of us are hungry for something similar. I cant wait to get this sorted as it will make many drupalDevs life's easier, when it comes to locative data.

In addition to adding jobs to drupal groups, I'm setting up a site were we can communicate our jobs that are available/coming. I'm hoping to give a lot of community jobs out of this project as its going to be absolutely HUGE; that plus sponsor modules, and of course drupal. I'm quite excited to see how this all plays out!

I will post back any new developments on the locative stuff here as I can see a few of you are interested.

summit’s picture

Hi Marco,

The place.module is in test, so I heard of WSF. How about your job. Any progress in this field please?
greetings, Martijn

Macronomicus’s picture

It's kinda back burner right now as we are pushing forward with the bookings engine api.

Also i discovered that my data already has lat/lon and am experimenting with the
Exhibit module which makes mapping really easy in d6!

Because I still think this functionality could be very useful we will come back to this.
Besides it seems they are working at it hard ... I received no responses from the location
module folks, tried several times; so I assume they have more than enough money and
are already hard at work getting this functionality sorted out nicely!

Cheers! ^_^

nicolash’s picture

Status: Active » Closed (fixed)

Setting this to closed, since it's only marginally related to this module.