osm-fr / bano

Différents outils pour la constitution de la Base Adresses Nationale Ouverte
Do What The F*ck You Want To Public License
30 stars 18 forks source link

Streamed json full export #85

Open yohanboniface opened 9 years ago

yohanboniface commented 9 years ago

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
    }
  }
}
cquest commented 9 years ago

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

yohanboniface commented 9 years ago

The one you prefer, I can adapt addok code if needed :)

yohanboniface commented 9 years ago

@cquest seems that id "625250222G" is missing from the export. Any idea why?

vdct commented 9 years ago

'625250222G' is 'Allée Honoré de Balzac', which is not in OSM yet. OSM is the only source for the street level.

yohanboniface commented 9 years ago

humm, but I have it in the csv export :s

vdct commented 9 years ago

At the street level, or only entries for housenumbers ?

yohanboniface commented 9 years ago

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.

yohanboniface commented 9 years ago

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?

vdct commented 9 years ago

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.