[Talk-us] US map rendering (Was: Re: Spot elevations collected as natural=peak and name=Point (height in feet))

Phil! Gold phil_g at pobox.com
Fri Mar 8 22:44:35 UTC 2019


* Kevin Kenny <kevin.b.kenny at gmail.com> [2019-03-08 14:25 -0500]:
> On Fri, Mar 8, 2019 at 11:37 AM Martijn van Exel <m at rtijn.org> wrote:
> >
> > I agree that a local US OSM map with a *subtly* adapted rendering would be fantastic. Phil Gold did some interesting work years ago on rendering US style highway shields taking into account (sometimes crazy) route concurrency (http://elrond.aperiodic.net/shields/?zoom=13&lat=39.75926&lon=-86.02786&layers=B - note that this is based on years-old data and probably pre-carto-switch stylesheet). Lars Ahlzen created the beautiful TopOSM which is a lot more divergent from the main map style, but another great example of initiatives around custom map rendering coming out of the US community.
> 
> I've borrowed ideas (and some limited amount of code) from both of
> them in doing my experimental rendering
[snip]
> The chief roadblocks to scaleability are that the graphics are
> generated in what amounts to a batch process, taking several minutes,
[snip]
> Then there's the issue that the graphics for individual shields are
> being stored in PNG, which is rendered in a batch process that takes
> typically several minutes (so could not cope with minutely updates).

I started work last year on a better system that generates SVGs on the fly
from OSM data, so it doesn't need the pregeneration step.  I got bogged
down with other things before I quite finished, but it's mostly there.
(There are just a few Canadian routes left to convert; I was having
difficulty finding official specs for their signs.)

I don't think this is really documented yet, but I now support four
different sign styles, passed as the `style` parameter to the Python
rendering functions:

 * "generic" uses a standard, generic style for every US state and county,
   disregarding their individual styles.
 * "guide" matches the styles used on highway guide signs.  This is now
   the default, since it seems most fitting to map rendering.
 * "sign" looks like the roadside reassurance markers.
 * "cutout" is a modification of the "sign" style to remove dark
   background areas.  This used to be the default with my old system.

Anyway, the code is here:

  https://gitlab.com/asciiphil/osm-shields

Hopefully at some point I'll find time to finish up my changes.  (And,
ideally, merge in all of the extra shields you and Minh have put
together.)

-- 
...computer contrarian of the first order... / http://aperiodic.net/phil/
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
What computers do Daleks use?  X-TERMINALS, X-TERMINALS!
---- --- --



More information about the Talk-us mailing list