Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8589141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:58:39+00:00 2026-06-11T22:58:39+00:00

I would use the API Geonames, but my application won’t have access to the

  • 0

I would use the API Geonames, but my application won’t have access to the internet. So it has to run stand-alone. I see there are many files from Geonames.org to download, but I don’t see any software to aid in being able to do Reverse Geocoding. I want to provide the lat/lon and have it return the country code. I’m thinking of downloading the data and put it into a MySQL database.

What algorithm is used for Reverse Geocoding so I can make use of it with the geonames.org downloads. My project is being written in PHP. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:58:40+00:00Added an answer on June 11, 2026 at 10:58 pm

    geonames downloads has mainly in .txt files, these can be imported via SQLYog to the mysql database

    Table Structure

    CREATE DATABASE geonames;
    USE geonames;
    
    CREATE TABLE geoname (
    geonameid int PRIMARY KEY,
    name varchar(200),
    asciiname varchar(200),
    alternatenames varchar(4000),
    latitude decimal(10,7),
    longitude decimal(10,7),
    fclass char(1),
    fcode varchar(10),
    country varchar(2),
    cc2 varchar(60),
    admin1 varchar(20),
    admin2 varchar(80),
    admin3 varchar(20),
    admin4 varchar(20),
    population int,
    elevation int,
    gtopo30 int,
    timezone varchar(40),
    moddate date
    ) CHARACTER SET utf8; 
    

    MYsql query to import data to this table

    LOAD DATA INFILE '/path/to/your/file/geoname.txt' INTO TABLE `geoname`;
    

    After all is set you can query this table against lat/long to get country name

    Here is the link you can refer to

    http://sgowtham.net/blog/2009/07/29/importing-geonames-org-data-into-mysql/

    http://forum.geonames.org/gforum/posts/list/732.page

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have access to an API that I would like to use, but it
How would I use Google Maps API to plot a route? E.g to have
To invoke a C API from C# I would use P/Invoke. But if I
I have downloaded the GAE SDK and would like to use its api from
I would like to use the wikipedia API to return the extract from multiple
I am gathering data from youtube's gdata API and would like to use the
I would use a multi dimensional gaussian modell for regression. Rasmussen has a book
I would use Jmagick into an Android Project. Is it possible? I have to
I am writing a Facebook application that would use a Postgres DB along with
I would like to use java xml signing api for xades-t signature type. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.