Updates VUT listing geocoded data set

parent 6a73d799
......@@ -79,7 +79,7 @@ if ( $fp !== FALSE ) { // if the file exists and is readable
continue;
// debug
//if ( $line == 6 )
//if ( $line == 15 )
// break;
echo "Geocoding register ".$line."...";
......@@ -90,6 +90,9 @@ if ( $fp !== FALSE ) { // if the file exists and is readable
$city = 'Valencia';
$address = $fp_csv[3];
echo "Trying to geocode ".$address."...";
echo "\r\n";
$pattern = '/^[a-zA-Z]* ([^,]*), .*/i';
$rep = '${1}';
$street_name = preg_replace($pattern, $rep, $address);
......@@ -114,6 +117,7 @@ if ( $fp !== FALSE ) { // if the file exists and is readable
echo 'Geocoding succeded for record '.$line.'.';
echo "\r\n";
echo "\r\n";
$output[] = '"'.$fp_csv[0].'","'.$fp_csv[1].'","'.$fp_csv[2].'","'.$fp_csv[3].'","'.$fp_csv[4].'","'.$lat.'","'.$lon.'"'.PHP_EOL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment