-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconsole-complete.php
More file actions
49 lines (41 loc) · 1.31 KB
/
console-complete.php
File metadata and controls
49 lines (41 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
include ("includes/console-connect.php");
include ("includes/importer.php");
$importer = new importer();
$importer->setPDO($dbh);
$importer->setUser(OSM_ROBOT_USER);
$automater = new automater();
$automater->setUser(OSM_ROBOT_USER);
$automater->setPDO($dbh);
//To seed a single country, examples
//Iceland 122
//Botswana 105
//Lesotho 216
//Turkey 313
//Tanzania 120
$country = $argv[1];
$missing= "yes";
system("chcp 65001");
$countries = $importer->getUnmappedCountries();
foreach($countries as $current)
{
$country = $current["id"];
echo $importer->getCountry($country)."\n\n";
echo "settlements\n";
$importer->settlements($country, "city");
$importer->settlements($country, "town");
$importer->settlements($country, "village");
$importer->settlements($country, "hamlet");
//echo "nominatim\n";
//$importer->loadCountryNominatim($country, "yes");
//POPULATE regions and areas
//$importer->nominatimByRules($country);
echo "populate\n";
$importer->populateAreas($country);
//echo "overpass\n";
//$automater->overpassByCountry($country, "", "", $missing);
//$automater->updateFromOverpassByRegion($country);
//echo "mapillary\n";
//$automater->mapillaryByRegion($country, $nullonly);
echo "fini!!";
}