Custom Highway Shields
Contents |
Description
Many people would love to see custom highway shields rendered by mapnik, this lookup table is designed to facilitate this.
For this page LGA means Local Government Area, this can be a county, or a council or a shire or .... but has less power and less area than a state.
For this to work, ways need to be joined into a route relation, with a network=* and ref=* tags, eg
type=route route=road name=Bruxner Highway network=NH ref=44
FORMAT
The format of these tables is used to feed the formatting program. That means, you should not just change the table layout. If you do, then you need to update the program as well.
Tagging issues
It seems in the US and Brazil that the state has been added to the network=* or ref=* tags because people didn't think of using the state and LGA boundaries, I will probably be flamed but this seems to be duplicating information that can be pulled from polygons and shouldn't be duplicated in tags.
is_in, addr:* and similar tags shouldn't be used either for the same reason.
Notes
Regex for most people is a pain in the butt, it will also make lookups easier especially when matching partial tags, for example an MABC route will have a ref=M1, so you will need to match the ref field as M\d.*, this sort of lookup would match M1a also, but the first character after the M must be a number.
This lookup table only supports road route relations, another lookup table will need to be produced for things like matching operator tags to banks, fast food places etc.
Countries should be looked up based on the surrounding polygon with admin_level=2. States should be admin_level=4. LGAs would be admin_level=6.
Rendering
The SVG images below can be rendered using inkscape from the command line as osm2pgsql etc figure out what signs are needed, these should in theory render better than trying to arbitarily plot numbers on PNG images, this is a work around until mapnik can handle SVG images directly.
cat imgae.svg | sed "s/XXX/123/" | inkscape --export-png=image.png --export-width=100 /dev/stdin
Regular Expressions
They don't display and/or get munged by the wiki, there is some php code on the discussion page converting non-alphanumeric characters to html characters.
Australia
| Australia | ||||||
|---|---|---|---|---|---|---|
| State | LGA | Network | Ref | SVG Image | Description/Notes | |
| .* | .* | NH | ^..?$ | National Highway National Alphanumeric routes in SA. | ||
| .* | .* | NH | ^....?$ | National Highway Wide National Alphanumeric routes in SA. | ||
| .* | .* | NR | .* | National Route | ||
| .* | .* | MR | .* | Metropolitan Route | ||
| .* | .* | DR | .* | Detour Route (NSW + Qld) | ||
| .* | .* | S | .* | State Highways | ||
| SA | .* | S | .* | State highways in South Australia | ||
| .* | .* | .* | ^[M|A|B|C|D]\d | Alphanumeric routes. (most AlphaNumeric routes don't have a network unless it's an alt route) | ||
| .* | .* | alt | ^[M|A|B|C|D]\d | Alternate alphanumeric routes | ||
| .* | .* | T | .* | Tourism Drive | ||
| .* | .* | T | brisbane_valley | Brisbane Valley Tourist Drive. Non-commercial use only. | ||
| .* | .* | T | bunya | Bunya Tourist Drive. Non-commercial use only. | ||
| .* | .* | T | cobbco | Cobb and Co Tourism Drive. Non-commercial use only. | ||
| .* | .* | T | dugong | Northern/Southern Moreton Bay Tourism Drive (Dugong icon). Non-commercial use only. | ||
| .* | .* | T | muttaburrasaurus | Muttaburrasaurus Tourism Drive. Non-commercial use only. | ||
Brazil
| Brazil | ||||||
|---|---|---|---|---|---|---|
| State | LGA | Network | Ref | SVG Image | Description/Notes | |
| .* | .* | BR | .* | National highway | ||
| .* | .* | BR_AC | .* | State highway, Acre | ||
| .* | .* | BR_AL | .* | State highway, Alagoas | ||
| .* | .* | BR_AM | .* | State highway, Amazonas | ||
| .* | .* | BR_AP | .* | State highway, Amapá | ||
| .* | .* | BR_BA | .* | State highway, Bahia | ||
| .* | .* | BR_CE | .* | State highway, Ceará | ||
| .* | .* | BR_DF | .* | State highway, federal district | ||
| .* | .* | BR_ES | .* | State highway, Espírito Santo | ||
| .* | .* | BR_GO | .* | State highway, Goiás | ||
| .* | .* | BR_MA | .* | State highway, Maranhão | ||
| .* | .* | BR_MG | .* | State highway, Minos Gerais | ||
| .* | .* | BR_MS | .* | State highway, Mato Grosso do Sul | ||
| .* | .* | BR_MT | .* | State highway, Mato Grosso | ||
| .* | .* | BR_PA | .* | State highway, Pará | ||
| .* | .* | BR_PB | .* | State highway, Paraíba | ||
| .* | .* | BR_PI | .* | State highway, Piaui | ||
| .* | .* | BR_PR | .* | State highway, Paraná | ||
| .* | .* | BR_RJ | .* | State highway, Rio de Janeiro | ||
| .* | .* | BR_RN | .* | State highway, Rio Grande do Norte | ||
| .* | .* | BR_RO | .* | State highway, Rondônia | ||
| .* | .* | BR_RR | .* | State highway, Roraima | ||
| .* | .* | BR_RS | .* | State highway, Rio Grande do Sul | ||
| .* | .* | BR_SC | .* | State highway, Santa Catarina | ||
| .* | .* | BR_SE | .* | State highway, Sergipe | ||
| .* | .* | BR_SP | .* | State highway, São Paolo | ||
| .* | .* | BR_TO | .* | State highway, Tocatins | ||
United States of America
Note: All U.S. state shields containing digits are svg text placeholders, and can be replaced with text using the Roadgeek fonts. Check for the <tspan> element.
| United States of America | |||||||
|---|---|---|---|---|---|---|---|
| State | LGA | Network | Ref | SVG Image | Description/Notes | ||
| .* | .* | I | \d{1,2} | |
Interstate highways | ||
| .* | .* | I | (\d{3}|\d{2}[EW]) | |
Interstate highways (3-char) | ||
| .* | .* | US | \d{1,2} | |
US highway | ||
| .* | .* | US | \d{3} | |
US highway (3-digit) | ||
| CA | .* | US | .* | |
US highway in California | ||
| .* | .* | (US:DE|US:IA|US:KY) | \d{2} | |
Generic state highway (used for 2-digit signs in Delaware, Iowa, and Kentucky) | ||
| .* | .* | US:IA | \d{3} | |
Generic state highway (used for 3-digit signs in Iowa) | ||
| .* | .* | (US:DE|US:KY) | \d{3} | |
Generic state highway, wide (used for 3-digit signs in Delaware and Kentucky) | ||
| .* | .* | (US:KY) | \d{4} | |
Generic state highway, wide (used for 4-digit signs in Kentucky) | ||
| .* | .* | US:AL | \d{2} | |
State highway in Alabama | ||
| .* | .* | US:AL | \d{3} | |
State highway in Alabama (3-digit) | ||
| .* | .* | US:AK | .* | |
State highway in Alaska | ||
| .* | .* | US:AK:BUS | .* | |
State highway in Alaska (Business route) | ||
| .* | .* | US:AZ | .{2} | |
State highway in Arizona | ||
| .* | .* | US:AZ | .{3} | |
State highway in Arizona (3-digit) | ||
| .* | .* | US:AR | .* | |
State highway in Arkansas | ||
| .* | .* | US:CA | \d{1,2} | File:Shield state california blank.svg | State highway in California | ||
| .* | .* | US:CA | \d{3} | File:Shield state california blank wide.svg | State highway in California (3-digit) | ||
| .* | .* | US:CO | .* | |
State highway in Colorado | ||
| .* | .* | US:CT | .* | |
State highway in Connecticut | ||
| .* | .* | US:DC | .* | |
State highway in the District of Columbia | ||
| .* | .* | US:FL | .{1,2} | File:Shield state florida blank.svg | State highway in Florida (1- and 2-digit) | ||
| .* | .* | US:FL | .{3,4} | |
State highway in Florida (3- and 4-digit) | ||
| .* | .* | US:GA | .* | |
State highway in Georgia | ||
| .* | .* | US:HI | .* | |
State highway in Hawaii | ||
| .* | .* | US:ID | .* | |
State highway in Idaho | ||
| .* | .* | US:IL | .{1,2} | |
State highway in Illinois | ||
| IL | .* | US:IL | .{3} | |
State highway in Illinois (wide) | ||
| .* | .* | US:IN | .{1,2} | |
State highway in Indiana | ||
| .* | .* | US:IN | .{3} | |
State highway in Indiana (wide) | ||
| .* | .* | US:KS | .{1,2} | |
State highway in Kansas | ||
| .* | .* | US:KS | .{3} | |
State highway in Kansas (wide) | ||
| .* | .* | US:LA | .* | |
State highway in Louisiana | ||
| .* | .* | US:MD | .{1,2} | |
State highway in Maryland | ||
| .* | .* | US:MD | .{3} | |
State highway in Maryland (wide) | ||
| .* | .* | US:MT | .{1,2} | State highway in Montana | |||
| .* | .* | US:OH | \d{1,2} | |
State highway in Ohio Routes numbered in the form 12A are unsigned. Use <tspan id="ref"> as placeholder.
| ||
| .* | .* | US:OH | \d{3} | |
State highway in Ohio (wide) Routes numbered in the form 123A are unsigned. Use <tspan id="ref"> as placeholder.
| ||
| PA | .* | US:PA | .{1,2} | State highway in Pennsylvania | |||
| PA | .* | US:PA | .{3} | State highway in Pennsylvania (wide) | |||
See also
- Road signs in the United States – with links to existing implementations