Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Efecto Airbnb
Efecto Airbnb Valencia
Commits
e386a2a1
Commit
e386a2a1
authored
Mar 08, 2019
by
Alfonso Sánchez Uzábal
Browse files
Updates VUT listing geocoded data set
parent
6a73d799
Changes
1
Hide whitespace changes
Inline
Side-by-side
scraping/geocoding-viviendas-turisticas-comunitat-valenciana.php
View file @
e386a2a1
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment