[Talk-us] Tagging of county roads
Lars Ahlzen
lars at ahlzen.com
Fri May 28 16:57:04 BST 2010
On 5/28/2010 11:04 AM, Phil! Gold wrote:
> * Nathan Edgars II<neroute2 at gmail.com> [2010-05-28 01:31 -0400]:
>> I don't know why there hasn't been any work on rendering U.S. Highway
>> and Interstate shields with a simple pattern match of "US *" and "I *";
>> it doesn't need to be perfect, just a reasonable outline.
>
> [...]
>
> I've seen that the TopOSM people are rendering US Highway and Interstate
> shields, but I haven't looked to see how they're doing it yet.
For TopOSM, there's some preprocessing when importing the planet dump to
extract the actual digits. It might be possible to do this directly in
the query, but there are a lot of special cases.
Otherwise, it's basically just some pattern matching in the query for
the mapnik layer. For example:
<Layer name="interstateshields" status="on">
...
<Datasource>
...
<Parameter name="table">
(select * from us_osm_line where (highway = 'motorway' or
highway = 'trunk') and (ref like 'I %' or ref like 'I-%') order by
z_order) as interstateshields
</Parameter>
</Datasource>
</Layer>
--
Lars Ahlzen
lars at ahlzen.com
More information about the Talk-us
mailing list