User:Kevina/Salt Lake Grid Cleanup Script

From OpenStreetMap Wiki
Jump to navigation Jump to search

The Salt Lake Grid Cleanup Script is a script I wrote to cleanup Salt Lake City street names (and in the future other cities with a similar grid system). I discussed it first with Talk-Us start July 2010 with the subject "Would Like To Clean Salt Lake City Street Names". Here is what it currently does:

1) Change all name tags (including name_1, alt_name, etc) so that include the primary street name as signed, _without_ the directional prefix, but with the "direction" (really part of the street name and not a suffix) spelled out, for example "900 East". The street signs do not generally include the directional prefix, and the prefix is generally not considered part of the name. They are only used when forming an address.

2) For any name tag changes changed add the tags "<name>:prefix" (one of N, S, E, or W, to be the directional prefix) and "<name>:full" to be the full name with the prefix spelled out, for example "South 900 East".

3) If the primary name is a numbered street and a multiple of 100, add the "loc_name" tag to represent the #th name (ie 9th East)commonly used.

4) Remove all redundant names. See example below

Here is an example of what my script will do.

IN:
  name: East 900 South
  name_1: East 900 South
  name_2: East 9th South
OUT:
  name: 900 South
  name:prefix: E
  name:full: East 900 South
  loc_name: 9th South