bano
bano copied to clipboard
Streamed json full export
As discussed, something like:
{"id": "751120874E","type": "street","name": "Allée de Bercy","postcode": "75012","lat": "48.842863","lon": "2.375239","city": "Paris","departement": "Paris", "region": "Île-de-France","housenumbers": {"96": {"lat": 48.843929,"lon": 2.373611},"64": {"lat": 48.842557,"lon": 2.375943}}}
{"id": "751120874E","type": "street","name": "rue de Tartempion","postcode": "75012","lat": "48.842863","lon": "2.375239","city": "Paris","departement": "Paris", "region": "Île-de-France","housenumbers": {"96": {"lat": 48.843929,"lon": 2.373611},"64": {"lat": 48.842557,"lon": 2.375943}}}
With one json document per line.
One json extended would look like:
{
"id": "751120874E",
"type": "street",
"name": "Allée de Bercy",
"postcode": "75012",
"lat": "48.842863",
"lon": "2.375239",
"city": "Paris",
"departement": "Paris",
"region": "Île-de-France",
"housenumbers": {
"96": {
"lat": 48.843929,
"lon": 2.373611
},
"64": {
"lat": 48.842557,
"lon": 2.375943
}
}
}
In addok code, 'dep' is used instead of 'departement'... which one should be used ? see https://github.com/yohanboniface/addok/blob/master/addok/import_utils.py#L13
The one you prefer, I can adapt addok code if needed :)
@cquest seems that id "625250222G" is missing from the export. Any idea why?
'625250222G' is 'Allée Honoré de Balzac', which is not in OSM yet. OSM is the only source for the street level.
humm, but I have it in the csv export :s
At the street level, or only entries for housenumbers ?
Oh, only housenumbers, good point :)
Now I remember that my previous import, running from the csv file, was doing a bit of a hack to create missing streets for which we had at least a housenumber.
Allées de Bristol in Bordeaux is missing too, but this one is in OSM.
Operon and Freed are suggesting that OSM streets without any housenumber are missing from the export.
Thoughts?
Streets with a name without any hsnr are part of the export only if their FANTOIR identifier is known. "Allées de Bristol" is missing (see http://cadastre.openstreetmap.fr/fantoir/#insee=33063) because no Fantoir code is matching. The trailing 's' in 'allées' is the reason : "ALLEES" is missing in https://github.com/osm-fr/bano/blob/master/dictionnaires/abrev_type_voie.txt and has to be added to ensure matching of OSM street name and Fantoir's one.