catatom2osm.hgwnames module

Parsing of highway names.

catatom2osm.hgwnames.dsmatch(name, dataset, fn)[fuente]

Fuzzy search best matching object for string name in dataset.

Parámetros
  • name (str) – String to look for

  • dataset (list) – List of objects to search for

  • fn (function) – Function to obtain a string from a element of the dataset

Devuelve

First element with the maximun fuzzy ratio.

catatom2osm.hgwnames.match(name, choices)[fuente]

Fuzzy search best match for string name in iterable choices.

If the result is not good enough returns the name parsed.

Parámetros
  • name (str) – String to look for

  • choices (list) – Iterable with choices

catatom2osm.hgwnames.normalize(text)[fuente]
catatom2osm.hgwnames.parse(name)[fuente]

Transform the name of a street from Cadastre conventions to OSM ones.