mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
courbes d'historique
This commit is contained in:
parent
06ced163e6
commit
d9219db84f
4 changed files with 233 additions and 30 deletions
|
@ -101,10 +101,10 @@ public function find_siret($tags) {
|
|||
|
||||
public function get_export_query($zone) {
|
||||
return <<<QUERY
|
||||
[out:csv(::id,::type,::lat,::lon,name,amenity,shop,office,healthcare,"contact:email",email,"contact:phone",phone,"contact:website",website,image,url,wikidata, opening_hours,"contact:housenumber","addr:housenumber","contact:street","addr:street",note,fixme,harassment_prevention,cuisine,brand,tourism,source,zip_code,"ref:FR:SIRET")];
|
||||
[out:csv(::id,::type,::lat,::lon,::timestamp,::version,::user,::uid,::changeset,name,amenity,shop,office,healthcare,"contact:email",email,"contact:phone",phone,"contact:website",website,image,url,wikidata, opening_hours,"contact:housenumber","addr:housenumber","contact:street","addr:street",note,fixme,harassment_prevention,cuisine,brand,tourism,source,zip_code,"ref:FR:SIRET")];
|
||||
{{geocodeArea:"{$zone}, France"}}->.searchArea;
|
||||
{$this->overpass_base_places}
|
||||
out skel qt;
|
||||
out meta;
|
||||
QUERY;
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,7 @@ QUERY;
|
|||
return '[out:json][timeout:25];
|
||||
area["ref:INSEE"="'.$zone.'"]->.searchArea;
|
||||
'.$this->overpass_base_places.'
|
||||
out center tags;';
|
||||
out meta;';
|
||||
}
|
||||
|
||||
private $more_tags = ['image', 'ref:FR:SIRET'];
|
||||
|
@ -180,7 +180,14 @@ out center tags;';
|
|||
'name' => $element['tags']['name'] ?? '',
|
||||
'lat' => $element['lat'] ?? null,
|
||||
'lon' => $element['lon'] ?? null,
|
||||
'tags' => $element['tags']
|
||||
'tags' => $element['tags'],
|
||||
// Métadonnées OSM
|
||||
'timestamp' => $element['timestamp'] ?? null,
|
||||
'version' => $element['version'] ?? null,
|
||||
'user' => $element['user'] ?? null,
|
||||
'uid' => $element['uid'] ?? null,
|
||||
'changeset' => $element['changeset'] ?? null,
|
||||
'modified' => $element['timestamp'] ?? null
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue