Service

Anybody know of the online service (RPC, HTTP, anything free and instantaneous) that offers you the latitude and also longitude given a precise city and condition (US)

http: //www. zipinfo. com/search/zipcode. htm

Monsterous, but it works (remember to check on the " latitude along with longitude" box. )

http: //www. arrl. org/locate/locate. html

A lot easier within the eyes and you will not click a checkbox.

Sure is clumsy but will check into it.

Look at that second you. It’s a ton easier both within the eyes and at a user standpoint.

The USGS apparently incorporates a massive list that one could even download. Find " Geographic Names Information System" on the search engines.

I wrote a PHP script that will parse the USGS data that’s formatted in variety form. Here it truly is:

PHP:


< php
error_reporting
(E_ALL  &   E_NOTICE);
ob_implicit_flush(true);
set_time_limit(60  60);

echo  "< pre> ";

$filename  $_GET'filename';
if  (empty(
$filename)  or ! is_readable($filename))

        die("File  & quot; "  .   htmlspecialchars($filename) .   "& quot;   not  readable");

echo  "Connecting  to  and  selecting  db... \n";
mysql_connect("foo",   "bar",   "baz");
mysql_select_db("vst");

echo  "Loading  file  into  plethora... ";
$contents  file($filename);
echo 
"Done\n";

echo  "Parsing  "  .   sizeof($contents) .   "  lines  of  data... \n";
$querybits  =  array();
for  (
$i  0;   $i  <   sizeof($contents);   $i++)

        $stepping  5000;
        if  (
$i  $stepping  ==  and  $i  ! =  0)
       
                echo 
"Assembling  query  for  items  "  .   ($i  $stepping) .   "  to  $i... ";
               
ob_flush();
               
$query  "INSERT  INTO  usgsdata  (state,   area,   latitude,   longitude,   elevation)
                        VALUES  " 
.   implode<span style="color: #00

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *