Giter VIP home page Giter VIP logo

osm-shields's Introduction

Custom Highway Shields for OpenStreetMap

This project is yet another attempt at a custom highway shield rendering, suitable for US-style maps, for OpenStreetMap.

Background

This project is largely derived from an earlier effort led by Phil! Gold. It attempts to layer atop a completely standard import of OpenStreetMap data resulting from a run of osm2pgsql, and to work with an unmodified Mapnik. These constraints are relatively severe. They imply that that nothing can modify the 'slim tables' and import tables even to the extent of creating foreign key constraints that refer to them (doing so causes deadlocks when running osm2pgsql to update the database). Moreover, they imply that code executed at rendering time (that is, in response to a database query from Mapnik) cannot modify the database in any way, because Mapnik has a read-only connection. Rendering queries therefore may not use temporary tables, much less cache results in the database. (This restriction rules out the technique that the earlier project used for creating shield clusters.)

Installation

Prerequisites

As a prerequisite, the user is expected to have a PostgreSQL database already set up, with 'slim' tables available. The workflow described at the 'switch2osm' web site is fairly typical of what is required. Most people who develop any sort of rendering chain based on OpenStreetMap have already performed the necessary steps.

Several of the main scripts that maintain the project's database information are written in the Tcl programming language, and therefore its interpreter and PostgreSQL interface must also be present on the target system. On a Debian-based system such as Ubuntu, they may be installed with

sudo apt-get install tcl8.6 tcl8.6-tdbc tcl8.6-tdbc-postgres

In addition, Inkscape is required to process SVG files, and ImageMagick is required in some cases to compose graphics that comprise multiple signs. It is believed that the following command should suffice on Debian systems:

sudo apt-get install imagemagick inkscape

Inkscape, in turn, will require the Roadgeek 2005 fonts in order to render the highway signs. They can be found in the Github release system for the roadgeek-fonts project.

Users of other operating systems should consult the local system's package manager for where to find the required third-party software.

Configuration

The file, config.tcl must be edited to reflect the local installation. The comments in the file should be self-explanatory. Note that the path to the PNG images, pngDir, must be accessible to the Mapnik instance at rendering time, since that is where the renderer will obtain the shield graphics.

Populating the database

Once the configuration is done, the system may be set up by typing,

./make-routetables.tcl --init

This command will initialize all the database tables required for shield rendering at run time, deleting any existing content. (See Database Tables below for an overview of the tables.) Leaving off the --init flag will reinitialize the tables describing route relations, but leave any precomputed shield graphics intact.

Once there are tables describing the routes, then the shield graphics corresponding to the routes have to be created so that the tile renderer can find them. This can be done with

./routeGraphics.tcl

On the initial run, this might take an hour or two to pass through the thousands of entries in the database and generate the graphics. On subsequent runs, it should be quite fast, no more than a few minutes, because most graphics will already be in place.

Expect that there will be a cascade of messages to the standard error about networks not being found or references not matching their networks. Some of these messages are caused by networks for which properly formatted graphics are not yet available, while others are simply typos in the OpenStreetMap data. At the end of the run, the networks that could not be recognized are listed, with the ones having the most associated routes being listed first.

Once this is done, the database should be set up and ready to go for rendering.

Rendering from the database

The installation will create several stored procedures in the database to aid in identifying where to place highway shields. These procedures will return ways and multiple columns containing the file names where corresponding graphics are to be found, suitable for use with a GroupSymbolizer in Mapnik.

A suitable style for placing shield custers in Mapnik XML might be:

  <Style name="road-shield">
    <Rule>
      <GroupSymbolizer start-column="1" num-columns="8"
		       placement="line" spacing="200"
		       clip="false">
	<PairLayout/>
	<GroupRule>
	  <Filter>[picture_%] != ''</Filter>
	  <ShieldSymbolizer file="[picture_%]"
	                    fontset-name="book-fonts" size="10" fill="white"
			    >' '</ShieldSymbolizer>
	</GroupRule>
      </GroupSymbolizer>
    </Rule>
  </Style>

(The procedures are set up to return eight columns because this is the maximum number of concurrent signed routes that has yet been observed. The count is easily changed, since internally there is no hard limit.)

This style would then be driven from a layer whose definition might look like:

   <Layer name="road-shields-16-up"
	   status="on"
	   srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +no_defs"
	   maximum-scale-denominator="12500" >
      <StyleName>road-shield</StyleName>
      <Datasource>
    <Parameter name="type">postgis</Parameter>
    <Parameter name="dbname">gis</Parameter>
	<Parameter name="estimate_extent">false</Parameter>
	<Parameter name="extent">
		-9462156.716111112, 3895303.962851664, 
		-7347086.391333333, 6106854.83403499
	</Parameter>
	<Parameter name="srid">3857</Parameter>
	<Parameter name="geometry_field">way</Parameter>
	<Parameter name="geometry_table">planet_osm_line</Parameter>
	<Parameter name="table">
	  (SELECT way, id, picture_1, picture_2, picture_3, picture_4,
	          picture_5, picture_6, picture_7, picture_8
           FROM planet_osm_query_shields_line_all(!bbox!,28))
	   AS pictures
	</Parameter>
      </Datasource>
    </Layer>

Here, most of the Parameter objects are just the usual mess required for database connectivity and geographic projection. Only the table parameter is any different from any other PostGIS layer. In it, a stored procedure is called to calculate route concurrences and return a set of ways (with mapping to sets of graphics) for routes in the current bounding box. Multiple procedures are provided:

  • PREFIX_query_shields_line_all

    Returns all signed, numbered routes in the PREFIX_line table. This is suitable only for the highest zoom levels.

  • PREFIX_query_shields_road_all

    Returns all signed, numbered routes in the PREFIX_road table. This is suitable for medium zoom levels; the road table attempts to filter out the least significant highways.

  • PREFIX_query_shields_road_major

    Returns all signed, numbered routes in the PREFIX_road table that are labeled highway=primary, highway=trunk, or highway=motorway. This is suitable for zoom levels out to views a few hundred kilometres across

  • PREFIX_query_shields_road_motorway

    Returns shield clusters only for motorways. This would be a suitable procedure for rendering at the scale of an entire country.

Keeping up to date

At present, the workflow is set up to update the tables describing routes all at once as a batch, by rerunning make-routetables.tcl without the --init option. Since this, and a rerun of routeGraphics.tcl, take only a few minutes, this can easily be slotted in after a daily run of a tool such as osmosis. This workflow is reasonably well suited for users who, for example, run from extracts posted at GeoFabrik.

Obviously, this process will not scale to a server that is processing minutely updates of the entire planet. Incremental update of the tables is, of course, possible. In fact, the developer of the current tables attempted to automate incremental updates based on SQL triggers on the PREFIX_rels and PREFIX_ways tables. This attempt proved to be unsuccessful because of the way that osm2pgsql locks the database. The first attempt by osm2pgsql to delete a relation deadlocked with itself.

Database tables

There are only a few tables needed to support shield clusters. They record the location of graphics in the file system, and provide the information needed to find out what shields are associated with a relation

PREFIX_shieldroute

The PREFIX_shieldroute table has a row for each route relation that might have a highway shield (hence excluding bus and rail routes, but including things like hiking and snowmobile routes so that they can be labeled with OSMC:symbol later).

Column Meaning
relid OSM ID of the route relation
route route=* value, such as 'road', 'hiking', 'snowmobile'
network network=* value, such as US:I
ref ref=* value

PREFIX_shieldway

The PREFIX_shieldway table has a row for each way that is a member of a route relation that might have a highway shield.

Column | Meaning -------+---------- relid | OSM ID of the route relation idx | Position of the way among the member ways of the route relation wayid | OSM ID of the member way role | Role of the member way in the relation

A foreign key constraint makes sure that 'relid' of the member pairs with 'relid' of the relation.

osm_shield_graphics

This table is not named with the import prefix, because it may be shared among imports of several regions. It keeps track of the generated graphics for highway shields

Column Meaning
id Arbitrary integer to serve as a primary key
route Type of route ('road', 'hiking', etc.) being represented
network Network (e.g. US:I) being represented.
ref Reference being represented
size Nominal size of the graphic in pixels.
filename Path name in the file system where the grapnic may be found.

The stored procedures discussed in the previous section function by joining one of the line tables (PREFIX_roads or PREFIX_ways) to PREFIX_shieldway, then to PREFIX_shieldroute and finally to osm_shield_graphics. This join may well yield multiple results. The first eight non-NULL ones are used for labeling. (Ordinarily, there will only be one or two.)

osm-shields's People

Contributors

1ec5 avatar kennykb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

1ec5 zelonewolf

osm-shields's Issues

Ohio county and township routes

This call to action lists several Ohio county and township route networks. Here are SVG templates at Wikimedia Commons that cover these route networks. Each SVG currently has 00 or 000 as the route number, but this text would be substituted for %num%.

Locality Network Template Modifier
Lucas Co. US:OH:LUC US:county LUCAS
Bath Twp., Summit Co. US:OH:SUM:Bath ?
Medina Co. US:OH:MED US:county:square:blue MEDINA
Stark Co. US:OH:STA US:county STARK
Sharon Twp., Medina Co. US:OH:MED:Sharon US:township:square:green (like US:county:square:green) SHARON
Carroll Co. US:OH:CAR US:county:square CARROLL
Vinton Co. US:OH:VIN Vinton County OH template.svg
Ashland Co. US:OH:ASD Ashland County OH template.svg
Portage Co. US:OH:POR ?
Findlay Co. US:OH:FAY ?
Chester Twp., Wayne Co. US:OH:WAY:Chester ?
Plain Twp., Wayne Co. US:OH:WAY:Plain ?
Harrisville Twp., Medina Co. US:OH:MED:Harrisville US:township:square HARRISVILLE
Congress Twp., Wayne Co. US:OH:WAY:Congress ?
Gilead Twp., Morrow Co. US:OH:MRW:Gilead ?
Union Co. US:OH:UNI US:county:square UNION
Westfield Twp., Medina Co. US:OH:MED:Westfield ?
Jefferson Twp., Logan Co. US:OH:LOG:Jefferson US:township:square JEFFERSON
Litchfield Twp., Medina Co. US:OH:MED:Litchfield ?
Seneca Co. US:OH:SEN US:county SENECA
Wadsworth Twp., Medina Co. US:OH:MED:Wadsworth US:township:square WADS
Wood Co. US:OH:WOO ?
Stokes Twp., Logan Co. US:OH:LOG:Stokes ?
Licking Co. US:OH:LIC US:county:square LICKING
Union Twp., Logan Co. US:OH:LOG:Union ?
Washington Twp., Logan Co. US:OH:LOG:Washington ?
Harrison Twp., Logan Co. US:OH:LOG:Harrison ?
Athens Co. US:OH:ATH US:county:square:green ATHENS
Chatham Co., Medina Co. US:OH:MED:Chatham ?
McArthur Twp., Logan Co. US:OH:LOG:McArthur ?
Spencer Twp., Medina Co. US:OH:MED:Spencer ?
Rushcreek Twp., Logan Co. US:OH:LOG:Rushcreek ?
Clinton Twp., Wayne Co. US:OH:WAY:Clinton ?
Richland Twp., Logan Co. US:OH:LOG:Richland ?
Zane Twp., Logan Co. US:OH:LOG:Zane ?
Miami Twp., Logan Co. US:OH:LOG:Miami ?
Perry Twp., Logan Co. US:OH:LOG:Perry ?
Fremont, Sandusky Co. US:OH:SAN:Fremont Fremont, Ohio, city route shield template.svg
Lake Twp., Logan Co. US:OH:LOG:Lake ?
Homer Twp., Medina Co. US:OH:MED:Homer ?
Lorain Co. US:OH:LOR ?
Boston Twp., Summit Co. US:OH:SUM:Boston ?
Bloomfield Twp., Logan Co. US:OH:LOG:Bloomfield ?
Chippewa Twp., Wayne Co. US:OH:WAY:Chippewa ?
Franklin Twp., Morrow Co. US:OH:MRW:Franklin ?
Ashland Co. township roads US:OH:ASD:TWP Ashland County OH template.svg *
Wooster Twp., Wayne Co. US:OH:WAY:Wooster ?
Guilford Twp., Medina Co. US:OH:MED:Guilford ?
Canaan Twp., Wayne Co. US:OH:WAY:Canaan ?
Berlin Twp., Holmes Co. US:OH:HOL:Berlin ?
Fairfield Twp., Columbiana Co. US:OH:COL:Fairfield ?
Bokescreek Twp., Logan Co. US:OH:LOG:Bokescreek ?
Montville Twp., Medina Co. US:OH:MED:Montville ?
Hamilton Co. US:OH:HAM
Hardin Co. US:OH:HAR US:county:square:green HARDIN
Paint Twp., Wayne Co. US:OH:WAY:Paint ?
Unity Twp., Columbiana Co. US:OH:COL:Unity ?
West Twp., Columbiana Co. US:OH:COL:West ?
Jackson Twp., Monroe Co. US:OH:MOE:Jackson ?
Coshocton Co. US:OH:COS US:county:square COSHOCTON
Wyandot Co. US:OH:WYA US:county:square WYANDOT

In general, you can find Wikimedia Commons shields and shield templates through the modules that power road-related infoboxes at the English Wikipedia.

Previously bug 1025086 at Launchpad.

Investigate alternatives to 'osm2pgsql' for data import/update.

The fundamental design of the processing for shield concurrencies requires that relation member information, at least for route relations, be available at run time.

I sketched out a design for how this might be accomplished, and asked the developers of osm2pgsql to review it before I started coding. They informed me that such a thing was not acceptable to the osm2pgsql project, and could not be made acceptable to it; their view is that no renderer will deal with relations and that all data to be rendered at run time must be on ways.

I've been unable to think of any means by which the rendering of route relation concurrencies can be addressed (particularly in the presence of minutely updates, where relation information will most assuredly be needed!) An alternative to osm2pgsql is therefore needed.

It appears that imposm3 may be suitable. Since several renderings that I already produce will need to be updated and requalified under imposm3, these will have to be converted before work on 'routeGraphics' in that environment can proceed, so this has to be a longer-term task.

Evaluate restructuring shieldroute and shieldway for query performance.

Paul Norman and Sarah Hofmann have expressed serious concern that using stored procedures and complex SQL queries will be too slow at render time. They are fairly adamant that deploying pictorial highway shields at large scale will require precomputing all the necessary data and having the material available in flat (and likely denormalized) tables.

Need to investigate feasibility of this approach, most likely in a postprocessing step after importing the data through the flex backend of osm2pgsql.

An alternative might be to carry out a detailed performance study to establish whether the existing stored procedures are or are not adequate to the task.

New York snowmobile routes are being returned from the stored procedures

Describe the bug
The stored procedures are mistakenly rendering snowmobile routes as road routes.

To Reproduce
See '7I' and '7B' in https://kbk.is-a-geek.net/catskills/test4.html?la=42.6052&lo=-74.2573&z=13

Expected behavior
Shoudn't do that.

Screenshots
snowmobile

Environment (please complete the following information):

  • PostgreSQL and PostGIS versions
    PostgreSQL 10.5 (Ubuntu 10.5-0ubuntu0.18.04) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0, 64-bit
    POSTGIS="2.4.3 r16312" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.3, released 2017/11/20" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" RASTER

  • Description of the OpenStreetMap export that you used
    northamerica from GeoFabrik
    sequenceNumber=1992
    timestamp=2018-09-01T20:15:02Z

  • Version of Mapnik, if applicable
    3.0.19

  • Tcl version if the problem involves one of the Tcl scripts
    8.6.8

Simplify Kentucky parkway shields

Revision 185 introduced a one-off shield for each parkway in the Kentucky parkway system that depicts the signs without the Unbridled Spirit branding but with the fully spelled-out road name that ends up being unreadable at the sizes that this renderer uses. These shields would be much more discernible as the same design but with an initialism of the road name, which can be displayed in larger type. For example, the Bluegrass Parkway would be “BG”, and the Western Kentucky Parkway would be “WK”. I’ve tagged each parkway’s route relation with short_name set to the two-letter initialism that the Kentucky Transportation Cabinet uses for official purposes. This renderer could refactor the various US:KY:Parkway-*.svg files as a single file that contains a variable like the templates for other route networks.

Wisconsin County Trunk Highway shields

Wisconsin has approximately 350 relations (this number continues to grow) which should all use the same shield pattern, for County Trunk Highways. Each county maintains its own system, and thus the networks are distinct, but the signs they use are consistent across the state. A general specification for the shield follows the list.

The following 72 county names are potentially used in the third field of a network tag, when prefixed with US:WI:
Adams
Ashland
Barron
Bayfield
Brown
Buffalo
Burnett
Calumet
Chippewa
Clark
Columbia
Crawford
Dane
Dodge
Door
Douglas
Dunn
Eau Claire
Florence
Fond du Lac
Forest
Grant
Green
Green Lake
Iowa
Iron
Jackson
Jefferson
Juneau
Kenosha
Kewaunee
La Crosse
Lafayette
Langlade
Lincoln
Manitowoc
Marathon
Marinette
Marquette
Menominee
Milwaukee
Monroe
Oconto
Oneida
Outagamie
Ozaukee
Pepin
Pierce
Polk
Portage
Price
Racine
Richland
Rock
Rusk
Saint Croix
Sauk
Sawyer
Shawano
Sheboygan
Taylor
Trempealeau
Vernon
Vilas
Walworth
Washburn
Washington
Waukesha
Waupaca
Waushara
Winnebago
Wood

Shields for this system uses marker M1-5A, which is outlined here: https://wisconsindot.gov/dtsdManuals/traffic-ops/manuals-and-standards/signplate/mseries/M1-5a.pdf

US:WI:Rustic road signage specifications

Contributing the SVG files to handle these (with the %num%, %suf% and %mod% substituents as needed), even if no programming is done, would be very much appreciated.

US:WI:Rustic should be able to use the following base SVG as found on Wikipedia Commons under a public domain license:
https://commons.wikimedia.org/wiki/File:Rustic_road.svg

The original this is derived from is standard MR1-99, which appears here: https://wisconsindot.gov/dtsdManuals/traffic-ops/manuals-and-standards/signplate/mseries/MR1-99.pdf

The other key piece of this signage (which would appear below the above shield, see Traffic Engineering, Operations & Safety Manual page 19) is MR4-53, whose standard appears here: https://wisconsindot.gov/dtsdManuals/traffic-ops/manuals-and-standards/signplate/mseries/MR4-53.pdf

Develop simplified graphics for 'busy' signs

Some signs are too complex and graphics-intensive to render readably at small sizes.
Erie County, NY is probably the worst offender (It's pretty unreadable in the field, as well!)

These will need a simplified representation when rendering on the map. The advantage of matching the sign precisely is lost when the result is too small to read.

Integrate tile rendering into Mapnik

Right now, Mapnik is driven with a single PNG file for each combination of network, ref and graphic size. This is rather a lot of tiny files. (This technique is inherited from the previous incarnation of osm-shields, which dates to before the time that Mapnik had an SVG interpreter.)

This task can break down into several smaller tasks.

First is to work out the plumbing so that Mapnik can render the shields directly from SVG, and switch to saving SVG instead of PNG. This will cut down on the file count tremendously, since the SVG is resolution-independent.

Second, and harder, would be to work out a way for Mapnik to render directly from template, rather than from SVG. This would mean that the 'shield_graphics' table would contain template and substitution strings, rather than naming a file containing the pre-rendered graphic.

It would be possible to go one step further and let Mapnik do it all - essentially, inventing a 'little language' so that the parsing of network and ref, and the selection of a template and forming of modifiers, would happen entirely contained in Mapnik. (I suppose that the Carto-CSS language could sort of do the job, but that doesn't feel like a very maintainable solution to me.) This last step might be a bridge to far; it's certainly possible to scale up the pipeline to frequent updates of a very large data base without taking it.

Import commit history

Thanks for reviving this project – I hope it succeeds where previous efforts were unsuccessful. Would it be possible to import Phil Gold’s original shield renderer’s commit history? Multiple people contributed to the SVG templates. Although that work is in the public domain and doesn’t technically need to be credit, it would be nice to give those folks credit and potentially involve them in the project going forward.

Round out declaration of all US counties as network elements

I went through this work at one point for the OSMAnd project; it took forever and a day to compile and assemble the result, but maybe it can help in this project.

I noticed that counties are explicitly named in the graphics grabber, but not all are. I went through the work to assemble 'a list of all counties alphabetically nationwide' since OSMAnd also does (albeit incompletely, I think) shields based on refs. Maybe it can be used as a catchall, or can be used to add to your existing lists, to help put county names into bins.

If not, please feel free to close this!

https://github.com/osmandapp/OsmAnd-tools/pull/135/files

Upgrade code to handle refs on ways

'routeGraphics.tcl' and the stored procedures need to be updated to handle refs on ways. These will need to appear with a dummy 'network' (cannot be the empty string, will likely be a single underscore). They need to be parsed into possible multiple refs, separated by semicolons.

This process needs to happen only on ways that do not participate in route relations. Where there are both route relations and 'ref' tags on the way, the 'ref' on the way is highly likely to be redundant, and by convention will be a less precise identifier (e.g., ON 120 rather than CA:ON:secondary 120).

Rendering will be with customary rounded-rectangle markers, not with custom shields. A posisble enhancement would be to recognize 'I', 'US', the fifty state abbreviations, and the ten Canadian province abbreviations, and use the appropriate shields for such cases, but it is not clear that this is a good idea; it's far from clear that 'CA' or 'I' mightn't be the first part of a 'ref' in a jurisdiction outside North America.

Explicitly out of scope is attempting to handle 'SR' or 'CR' by identifying the jurisdiction in which the way appears.

Integrate storage of route relations with osm2pgsql

The current mewthod of using on the 'slim tables' of osm2pgsql to generate the 'shieldroute' and 'shieldway' tables works well for a workflow that applies daily updates from GeoFabrik (a fairly common case for those who map less than the planet). It obviously cannot scale to minutely updates of a whole planet. Moreover, the developers of 'osm2pgsql' strongly deprecate accessing the slim tables, warning that their content may change without warning.

The SQL operations to create, update, or delete route relations are pretty trivial. The obvious possibility for handling minutely updates (and improving update performance on the less-frequent ones) would be to include an option in 'osm2pgsql' to keep these two tables in sync when the database is first imported and when diffs are applied.

Develop support for the 'flex' backend of 'osm2pgsql'

With the advent of the 'flex' backend in osm2pgsql, it now appears once more that osm2pgsql is fit for purpose to maintain the tables needed to track membership in route relations for placement of pictorial highway shields. This feature request is being created to track that development.

The idea is that the osm2pgsql style sheet can maintain these tables with additional calls to a new module, shieldtables.lua. This module will allow the following calls:

local shieldtables = require 'shieldtables'
local shieldt = shieldtables.new(prefix)

These will be called in the initialization of the style sheet, to create the object that manages the two new tables.
prefix is the table name prefix; default is planet_osm.

shieldt:process_way(object);

Must be called from osm2pgsql.process_way. In phase 2, creates any needed rows in the shieldway table for ways that bear highway numbers.

shieldt:process_relation(object)

Must be called from osm2pgsql.process_relation. Creates any needed rows in the shieldroute table to describe route relations.

return shieldt:select_relation_members(object)

Must be called from osm2pgsql.select_relation_members. Returns a table with a single key, ways, which in turn is a table of OSM ID's of ways that require phase 2 processing because they participate in route relations.

This appears to be much more in keeping with the usual workflow than would a switch to a different tool such as imposm3.
It also allows keeping a rough equivalent to the current conversion style, by adding the calls above to compatible.lua.

Much more work needs to be done, but forward progress is starting again.

Integrate 'routeGraphics' with tile expiration, trigger from tile update

The current mode of operation of 'routeGraphics.tcl' is to run as a batch, searching the database for route relations for which graphics are available but have not yet been generated.

This takes a while - it's too heavyweight for minutely updates.

There are several possibilities for how to address this.

One possibility would be to generate graphics on demand in 'osm2pgsql' when doing the import. I don't much like this; it's piling too much responsibility into that program.

A better possibility is to trigger running 'routeGraphics' separately when inserting a route for which graphics are not yet available, or to run it as a 'cron' job. This is somewhat more attractive, except that in some systems updating a route immediately triggers re-rendering of tiles in which it appears. There would therefore be a rendered tile with the new route and no shields.

This could be mitigated by having the 'routeGraphics' program also produce a tile expiry file, like the one that comes from 'osm2pgsql', so that the presence of new graphics will redraw the routes that use them. Some sort of functionality like this is needed anyway, so that when new graphics templates become available, the tiles that would benefit from them can be expired.

Some of this would be moot if the downstream pipeline could be altered to allow Mapnik to render directly from template SVG's, but there still needs to be a way to force tile refresh when new templates are provided.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.