WME Validator Localization for Indiana

This script localizes WME Validator for Indiana, USA. You also need main package (WME Validator) installed.

目前為 2016-08-10 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name WME Validator Localization for Indiana
  3. // @namespace https://gf.qytechs.cn/en/users/9555
  4. // @version 1.1.1.53
  5. // @author xanderb
  6. // @description This script localizes WME Validator for Indiana, USA. You also need main package (WME Validator) installed.
  7. // @match https://editor-beta.waze.com/*editor/*
  8. // @match https://www.waze.com/*editor/*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12. //
  13. /*
  14. See Settings->About->Available checks for complete list of checks and their params.
  15. Examples:
  16. Enable #170 "Lowercase street name" but allow lowercase "exit" and "to":
  17. "170.enabled": true,
  18. "170.params": {
  19. "regexp": "/^((exit|to) )?[a-z]/",
  20. "},
  21. Enable #130 "Custom check" to find a dot in street names, but allow dots at Ramps:
  22. "130.enabled": true,
  23. "130.params": {
  24. "titleEN": "Street name with a dot",
  25. "problemEN": "There is a dot in the street name (excluding Ramps)",
  26. "solutionEN": "Expand the abbreviation or remove the dot",
  27. "template": "${type}:${street}",
  28. "regexp": "D/^[^4][0-9]?:.*\\./",
  29. },
  30. *Note: use D at the beginning of RegExp to enable debugging on JS console.
  31. *Note: do not forget to escape backslashes in strings, i.e. use "\\" instead of "\".
  32. */
  33.  
  34. window.WME_Validator_United_States = {
  35. ".country": "United States",
  36. ".codeISO": "US",
  37. ".author": "xanderb",
  38. ".updated": "2016-08-09",
  39. ".link": "TODO: ",
  40. "128.enabled": true,
  41. "128.params": {
  42. "titleEN": "Incorrect Suffix",
  43. "problemEN": "Street suffix does not follow abbreviation rules",
  44. "solutionEN": "Rename the suffix Such as Road to Rd Please let me know about false positives",
  45. "template": "${street}",
  46. "regexp": "!/(Unknown Name| A(cres?|ly|nnex|ve|r(cade|tery))| B(ay|ch|end|lvd|luf|roadway|ypass|YP|r(a(e|nch|ook))?|ottom|(ike|us)way|ayou)| C(enters|t|lb?|hase|ommons?|o(urse|rs|rner)|ONN|amp|r(es|est|k)?|ir|swy|tr|v|u(rve|toff)|yn)| D(am|ale|e(n|ll)|onws|r)| E(ast|dgeway|n(d|t)|xit|states?|splanade|x(t|pwy))| F(a(hren|irway|lls?)|or(rges?|d|ks?)|wy|lats?)| G(ardens?|len|rv|r(ee)?n|a(p|te(way)?))| H(arborr|ills?|ollows?|ts|wy|ospital)| I(sle|nlt)| Junctions?| K(eys?|nolls?)| L(ocks?|dg|in[ke]|f|gts?|ndg|[np])|oop| M(all|dw|eadows|nr|anors|t|ns?|ile|o(hr|torway)|ews|sn)| N(eck|orth)| O(aks|ne|rchard|v(al|erpass))| P(a(ss|th|rade)|i(nes?|ke)|o(nd|inte)|romanade|orts?|l(ns|z)?|k(e|s)?|kwys?|ts?)| R(d|e(ach|st)|ow|i(se|ver)|amp|ailroad|nch|\.R\.|ailway|pds|idge|u(n(way)?|e)|te)| S(ho(als?|res?)|kwy|outh|p(ur|ngs|ring)|u(permarket|bdivision)|t(a|rut)|[qt]s?)| T(er|hwy|race|pke?|un|urn|r(l|fy)|ra(ck|in))| U(nderpass|pr)| V(iews?|i(llages?|sta)|ly|alleys|iaduct)| W(alk|ays?|ls?|est|oods|ynde?)| X(-ing|rd)| Yard|^$)( [SNEW]{1,2})?$|^([SNEW]{1,2} )?(Old )?(\\d{1,4} [SNEW]|Alley|Broadway|Greentree|MBTA|Railroad|Amtrak|I-|IN-|IA-|KY?-|US-|LA?-|M[DNSO]?-|N[VJYCD]?-|S[CDRH]?-|RI?-|TN-|V[AT]-|W(V|IS)-|C[RH]-|Runway|Place |Parkway|Access |Avenue (of|del) |Cll (las|de) |Circle of |State |Via |County |The |to |(Left )?E(xit( to:)?|ntry) )/",
  47. },
  48. "128.solutionLink": "W:Abbreviations_and_acronyms/USA",
  49. "129.enabled": true,
  50. "129.params": {
  51. "titleEN": "Incorrect State or US Highway",
  52. "problemEN": "Indiana uses IN and US for numbered highway names",
  53. "solutionEN": "Rename the Street or Alt Street",
  54. "template": "${state}:${street}#${altStreet[#]}",
  55. "regexp": "/Indiana:.*(I[Nn] Hwy |State Hwy |I- |In-|SR-|SH-|State Rd |IN=|State Rte |U\.?[Ss]\.? [Hh](WY|wy|ighway))/"
  56. },
  57. "129.solutionLink": "W:Indiana",
  58. "130.enabled": true,
  59. "130.severity": "warning",
  60. "130.params": {
  61. "titleEN": "Alley not PLR",
  62. "problemEN": "Alleys should be set to the PLR Road Type",
  63. "solutionEN": "Change Road Type",
  64. "template": "${street}:${typeRank}",
  65. "regexp": "/(Alley( [0-9]*)?| Aly):[^[7|11]/"
  66. },
  67. "130.solutionLink": "W:Road_types/USA#Parking_Lot_Road",
  68. "131.enabled": true,
  69. "131.params": {
  70. "titleEN": "Not Indiana",
  71. "problem": "The segment is assigned to another state",
  72. "solutionEN": "Make sure you are editing in Indiana and change it",
  73. "template": "${state}",
  74. "regexp": "!/Indiana/"
  75. },
  76. "131.solutionLink": "W:Creating_and_editing_road_segments#Address_Properties",
  77. "132.enabled": true,
  78. "132.params": {
  79. "titleEN": "Wrong name for City or County street",
  80. "problemEN": "CS and Cs are not read correctly by TTS or County Hwy Name is wrong",
  81. "solutionEN": "Check sources and change the street's name",
  82. "template": "${state}:${street}#${altStreet[#]}",
  83. "regexp": "/Indiana:.*(Cs-|CS-|County Hwy |County Rd |CR |Cr-|Ch-|Co Rd )/"
  84. },
  85. "133.enabled": true,
  86. "133.params": {
  87. "titleEN": "Name on Railroad",
  88. "problemEN": "Names on Railroads are not needed for routing and clutter the app UI",
  89. "solutionEN": "Remove the Names and Cities from Railroad segments",
  90. "template": "${type}:${street}",
  91. "regexp": "/^18:.+$/"
  92. },
  93. "133.solutionLink": "W:Road_types/USA#Railroad",
  94. "134.enabled": true,
  95. "134.params": {
  96. "titleEN": "Bad TTS Street name",
  97. "problemEN": "Streets that start with St and Dr result in TTS reading Street or Drive",
  98. "solutionEN": "Add a period after Jr, St, Dr, or Rev where required",
  99. "template": "${street}#${altStreet[#]}",
  100. "regexp": "/((^| )(St|Dr)(?! ((BYP|Ext|[NEWS][EW]?)\\b|\/|\\())|(Jr|Rev)) /"
  101. },
  102. "134.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations",
  103. "135.enabled": true,
  104. "135.params": {
  105. "titleEN": "Wrong road type (major)",
  106. "problemEN": "All US Highways should be at least Major Highway (except BUS, SPUR, LOOP)",
  107. "solutionEN": "Change the road type to Major Highway",
  108. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  109. "regexp": "/^[1-9][^245]?:.*#(US Hwy |US-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*@/i"
  110. },
  111. "135.solutionLink": "W:Road_types/USA#Major_Highway",
  112. "136.enabled": true,
  113. "136.params": {
  114. "titleEN": "Wrong road type (minor)",
  115. "problemEN": "All US BUS, SPUR, LOOP highways and State Highways (except BUS, SPUR, LOOP) should be at least Minor Highway type",
  116. "solutionEN": "Change the road type to Minor Highway",
  117. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  118. "regexp": "/^[1-9][^2-5]:.*#((State Hwy |SR-|SH-|IL-|IN-|K-|LA-|M-|MA-|MO-|MS-|NC-|ND-|NJ-|NV-|NY-|SC-|SD-|TN-|VT-|WIS-)[0-9]+( ALT| BYP| CONN| TRUCK| Scenic| [NSWE])*|(US Hwy |US-)[0-9]+( BUS| LOOP| SPUR)+( [NSWE])?)@/i"
  119. },
  120. "136.solutionLink": "W:Road_types/USA#Minor_Highway",
  121. "137.enabled": true,
  122. "137.params": {
  123. "titleEN": "Wrong road type (primary)",
  124. "problemEN": "All State BUS, SPUR, LOOP Highways should be at least Primary Street type",
  125. "solutionEN": "Change the road type to Primary Street",
  126. "template": "${typeRank}:#${street}@#${altStreet[@#]}@",
  127. "regexp": "/^[1-9][^1-5]:.*#(State Hwy |SR-|SH-|IL-|IN-|K-|LA-|M-|MA-|MO-|MS-|NC-|ND-|NJ-|NV-|NY-|SC-|SD-|TN-|VT-|WIS-)[0-9]+( BUS| LOOP| SPUR)+( [NSWE])?@/i"
  128. },
  129. "137.solutionLink": "W:Road_types/USA#Primary_Street",
  130. "138.enabled": true,
  131. "138.params": {
  132. "titleEN": "Wrong banner abbreviation",
  133. "problemEN": "Banner abbreviation may be incorrect. Abbreviations ALT, BUS, BYP, CONN, LOOP, and SPUR should be in ALL CAPS",
  134. "solutionEN": "Change banner abbreviation to ALT, BUS, BYP, CONN, LOOP, SPUR, or TRUCK",
  135. "template": "${street}#${altStreet[#]}",
  136. "regexp": "/[0-9]+[A-Z]? ([Aa]lt(ernate)?|[Bb](us(iness)?|yp(ass)?)|[Cc]onn(ector)?|[Ll]oop|[Ss]pur|[Tt]ruck)/"
  137. },
  138. "138.solutionLink": "W:Road_names/USA#United_States_Numbered_Highways",
  139. "139.enabled": true,
  140. "139.params": {
  141. "titleEN": "One Way Lock Standard",
  142. "problemEN": "One Way Street and Primary Street should be one lock higher",
  143. "solutionEN": "Set One Way Street to L2 and Primary Street to L3",
  144. "template": "${type}:${lock}:${direction}",
  145. "regexp": "/(2:(1|2):(1|2))|(1:1:(1|2))/"
  146. },
  147. "139.solutionLink": "W:Great_Lakes#Minimum_Road_Lock_Standard",
  148. "171.params": {
  149. // {string} regular expression to match incorrect abbreviations
  150. "regexp": "/\\.$/",
  151. },
  152. //Freeway lock
  153. "150.enabled": true,
  154. "150.params": {
  155. // {number} minimum lock level
  156. "n": 5,
  157. },
  158. //Major Highway lock
  159. "151.enabled": true,
  160. "151.params": {
  161. // {number} minimum lock level
  162. "n": 3,
  163. },
  164. //Minor Highway lock
  165. "152.enabled": true,
  166. "152.params": {
  167. // {number} minimum lock level
  168. "n": 3,
  169. },
  170. //Ramp lock
  171. "153.enabled": true,
  172. "153.params": {
  173. // {number} minimum lock level
  174. "n": 3,
  175. },
  176. //Primary Street lock
  177. "154.enabled": true,
  178. "154.params": {
  179. // {number} minimum lock level
  180. "n": 2,
  181. },
  182. //Default US checks
  183. "24.enabled": !0,
  184. "25.enabled": !0,
  185. "27.enabled": !0,
  186. "34.enabled": !0,
  187. "35.enabled": !0,
  188. "38.enabled": !0,
  189. "39.enabled": !0,
  190. "43.enabled": !0,
  191. "48.enabled": !0,
  192. "59.enabled": !0,
  193. "78.enabled": !0,
  194. "87.enabled": !0,
  195. "90.enabled": !0,
  196. "106.enabled": !0,
  197. "107.enabled": !0,
  198. "108.enabled": !0,
  199. "109.enabled": !0,
  200. "112.enabled": !1,
  201. "118.enabled": !0,
  202. "116.enabled": !0,
  203. "119.enabled": !0,
  204. "120.enabled": !0,
  205. "121.enabled": !0,
  206. "172.enabled": !0,
  207. "173.enabled": !0,
  208. "190.enabled": !0,
  209. "192.enabled": !0,
  210. "170.enabled": !0,
  211. "170.params": {
  212. regexp: "/^(?!(to) [^a-z])((S|N|W|E) )?[a-z]/"
  213. },
  214. "171.enabled": true,
  215. "171.solutionLink": "W:Abbreviations_and_acronyms/USA#Standard_suffix_abbreviations",
  216. "171.params": {
  217. "regexp": "/((?!(\\bPhila|\\bPenna|.(\\bWash|\\bCmdr|\\bProf|\\bPres)|..(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|...(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|...(#| )[NEWSR])).{5}\\.|((?!(hila|enna|(\\bWash|\\bCmdr|\\bProf|\\bPres)|.(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|..(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|..(#| )[NEWSR])).{4}|(\\bhila|\\benna))\\.|((?!(ila|nna|(ash|mdr|rof|res)|(\\bAdm|\\bSte|\\bCpl|\\bMaj|\\bSgt|\\bRe[vc]|\\bR\\.R|\\bGov|\\bGen|\\bHon|\\bCpl)|.(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|.(#| )[NEWSR])).{3}|\\b(ila|nna|ash|mdr|rof|res))\\.|((?!(la|na|(sh|dr|of|es)|(dm|te|pl|aj|gt|e[vc]|\\.R|ov|en|on|pl)|(\\bSt|\\b[JSD]r|\\bLt|\\bFt)|(#| )[NEWSR])).{2}|\\b(la|na|sh|dr|of|es|dm|te|pl|aj|gt|e[vc]|\\.R|ov|en|on|pl))\\.|(#|^)[^NEWSR]?\\.)|(((?!\\b(D|O|L)).|#|^)\'(?![sl]\\b)|(#|^)\'s|(?!\\b(In|Na)t).{3}\'l|(#|^).{0,2}\'l)|(Dr|St)\\.(#|$)|,|;|\\\\|((?!\\.( |#|$|R))\\..|(?!\\.( .|#.|$|R\\.))\\..{2}|\\.R(#|$|\\.R))|[Ee]x(p|w)y\\b|Tunl\\b|Long Is\\b|Brg\\b/",
  218. "problemEN": "The street name has incorrect abbreviation, or character",
  219. "solutionEN": "Check upper/lower case, a space before/after the abbreviation and the accordance with the abbreviation table. Remove any comma (,), backslash (\\), or semicolon (;)"
  220. },
  221. };

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址