New icon for highway=toll_gantry

Hi. I would like to request a new icon for the tag: highway=toll_gantry
As a former truck driver, I would like to see a map marker for highway=toll_gantry. It often happens that drivers forget to turn on the toll booth of the country in question when crossing a state border. An icon on the map can remind them of the obligation to have the booth turned on.

I can make an icon. I am interested in how I can implement such an icon in maps? Thank you

There are lots of maps made from OSM data. A quick check suggests that none of the 6 maps on the osm.org currently show it. There are lots of others though - some maps do show it, though, and there will others not on that list. Usage worldwide is fairly high as these things go.

The way that things get added to maps is in one of two ways:

  • For map styles not developed “in the open”, you need to interest the person or organisation that develops the style in including it.
  • For maps where the styles are hosted at e.g. github, you can create a “pull request” that adds the functionality and also interest the maintainers in including it.

Of the styles hosted at osm.org, the “standard” style is maintained at github, but hasn’t been especially welcoming to changes to what is displayed for a number of reasons. If I was going to add toll gantries to a web map style I wouldn’t bother trying to make the case with that style as it is likely a waste of time.

To get details of the other styles, you can look at the attribution text on the osm.org map when you select that style. Maybe ask Cyclosm or Tracetrack Topo; but perhaps not the authors of the humanitarian style as I don’t think that is very actively developed.

4 Likes

OSMand renders them.

Navigation apps are where I would expect to see them render

2 Likes

Doubtlessly misunderstanding but I see toll_gantry icons on Carto S, but likely that’s because they’ve got the toll_booth tag on them as well.

… and yes, those with only a booth tag show the icon

no gantry tag anywhere on that motorway exit. Maybe a little overpass needs running to find how pervasive this is. Those looking for gantry are cooked. Notably the cost here of TelePass is small… no queuing., just barrel through at about 30km max. The digital license plate reader surveillance will catch yah… had it once.:eyes:

Yes indeed

Here is a correctly tagged toll gantry (no booth) which is not rendered by osm-carto (but as stated above is rendered by OsmAnd) Node: 291600207 | OpenStreetMap

1 Like

For what it’s worth, and perhaps underscoring the point, OSMCarto (the ‘Standard’ style on the website) has previously declined to render toll gantries. You can see the discussion here: Add toll gantry rendering · Issue #4565 · gravitystorm/openstreetmap-carto · GitHub.

2 Likes

If I may ask, where on the web can I view the OSM map using the CARTO S style? I want to verify the display of the toll gate.

If I may ask, where on the web can I view the OSM map via CARTO S style? I want to check the display of the toll gate.

Are we talking about an automatic electronic toll gate?
[File:CR0344eRoad-MM4-TollGantry (29081629762).jpg - OpenStreetMap Wiki](OSM Wiki)

Just go to www.osm.org or www.openstreetmap.org and on right side there’s a squarish box where the background/map layer can be selected.

That’s the one we all want ‘everything’ to be rendered in, which of course is impossible and is the reason there are countless ‘specialized’ map renderings to serve a particular interest. Why toll_gantry cant have an icon as toll_booth already has, 64000 USD question, I have no desire to delve into.

Strictly, Carto S(tandard). is for the active mapping audience who want to see a real quick map update after uploading their edits… roads, landcover, buildings, points of interest etc etc.

1 Like

I maintain a map style, and host raster and vector maps on the web for that cover the UK and Ireland. It doesn’t include toll gantries currently, but I’d be happy to accept pull requests that added that, provided that a way can be found that doesn’t confuse people looking at it.

Although (if you’re not in the UK/IE) my hosted maps won’t be much use, creating and hosting the vector maps is pretty easy. Vector map “hosting” is literally “some files on a webserver on the internet” so it really isn’t rocket science. Raster maps are a bit more work, but not much.

If you’re interested in doing the work to make this happen, let me know and I’m sure I can help point you in the right direction!

OSMand renders them.

Navigation apps are where I would expect to see them render

It’s been a very long time since I’ve taken a toll road (ongoing turnpike “Pike Off!” boycott currently in Oklahoma), does Osmand finally announce these same as tollbooths? Would be nice if it was, since some toll plazas still expect you to slow down to parking speeds, with badly designed examples (such as one that I’m personally aware of) awkwardly situated behind a curve under an overpass and not obvious until close enough that vehicles with low weight to brakepower ratio are in an emergency braking situation.

I am quite interested in how to take the OSM map to your server with my file icons. How to do it?

I suspect that we might need to be a bit careful here - of the web-based maps that I host, none are in exactly the style that you can see in any of the maps at osm.org . As an example, here is some toll infrastructure (barrier=toll_booth rather than gantry) in OSM and here is my map of that.

I’d be happy to add support for toll_gantry to my map style, but I don’t have the space or the inclination to host another may style on my server as well.

So to answer the question "what work needs to be done to add highway=toll_gantry to my map style (the relevant github projects for raster are the lua, CartoCSS and legend, and for vector are extract and display):

  1. Look into how these things are actually tagged in OSM, especially in the bit of OSM that I’m creating a map for. That’s essentially this, but updated and localised. It also needs to look at what types of OSM objects (nodes, lines, polygons) have these tags.
  2. Work out what infrastructure occurs together. If toll booths and gantries are tagged close together (or on the same object) then we need to choose which to show.
  3. Identify some test cases (different sorts of objects with different combinations of tags)
  4. Choose icon(s) for toll gantries that are “characteristic”, even if shown on a map quite small. The size and colour should match other similar icons (so on my map it’d be “highway infrastructure black” or maybe “travel infrastructure blue”). The icons in my case will be small .pngs, and for vector need to be the same size as other vector icons. The background will be transparent.
  5. Add some lines of code to the lua so that (on both raster and vector) the data can be extracted as some value that the raster and vector rendering code can process. This doesn’t have to be highway=toll_gantry, but it might be.
  6. Change the raster project.mml to include the new data from the database tables as nodes, lines or polygons, as required, and names if required.
  7. Change one of the raster .mss files to display the new icon(s) at appropriate zoom levels, and names if required.
  8. Test that the test objects look OK on raster.
  9. Add to the raster legend in an appropriate place - likely next to barrier=toll_booth
  10. Test that the legend looks OK.
  11. Convert icons to vector format by adding a line to here and creating a new sprite file.
  12. Change the vector extract code to extract the new value at appropriate zoom levels.
  13. Change the vector style code to display the new value at appropriate zoom levels, and names if required.
  14. Test that the test objects look OK on vector.

Obviously there are some shared, some raster only and some vector only tasks there. I tend to vector first since creating a new map for an area is quicker for that than with raster.

Once everything’s OK I’ll update taginfo and the changelogs for the affected projects, check the code in, fetch on the “map” server and reload both raster and vector maps there.

Of the tasks above, the first three require some knowledge with taginfo and overpass, and what is needed here is easily learned. The fourth needs some very basic knowledge of an image editor such as “gimp”.

Thank you. For the exhaustive answer. It seems that it is quite extensive because of 1 icon on the map.
If you need help with graphic editors, I have, I can create the TOLL_GANTRY icon and I have an idea of ​​what it might look like.

Now I am interested in how I can install the OSM map like you have, for my area on my webserver, domain

It’s not really related to toll gantries, but here goes anyway :grinning: - as a non-root user on a Linux machine such as Ubuntu 24.04 or Debian 12:

cd
mkdir src
cd src
git clone https://github.com/SomeoneElseOSM/SomeoneElse-style
git clone https://github.com/SomeoneElseOSM/SomeoneElse-vector-extract
git clone https://github.com/SomeoneElseOSM/SomeoneElse-vector-web-display
git clone https://github.com/systemed/mod_mbtiles
git clone https://github.com/systemed/tilemaker

Install some useful software:

sudo apt install screen git tar unzip wget bzip2 apache2 socat net-tools curl

Install mod_mbtiles to allow Apache to server .mbtiles from one big file:

cd mod_mbtiles
sudo apxs -lsqlite3 -i -a -c mod_mbtiles.c
sudo systemctl restart apache2

mkdir ~/data

Install software needed to build tilemaker:

 sudo apt install build-essential libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-program-options-dev libboost-system-dev liblua5.1-0-dev libshp-dev libsqlite3-dev rapidjson-dev zlib1g-dev

cd ~/src/tilemaker
make
sudo make install

(note what “Lua language version” is shown here - you will need that later)

If we’re just installing into the default Apache config, then edit “000-default.conf” to add:

MbtilesEnabled true

below “DocumentRoot”

cd ~/src/SomeoneElse-vector-extract/
sudo cp update_vector.sh /usr/local/sbin/

sudo nano /usr/local/sbin/update_vector.sh

(replacing nano with your preferred editor)

In there:

  1. change:
    local_filesystem_user=ajtown
    to whatever local user account you are using.

  2. Use the lua version you noted down above in place of 5.3 in lines referring to “share/lua”

  3. Change “-27.57,34.5,40.17,71.64” to a bounding box that covers your country.

  4. Change “europe britain-and-ireland” to the path to your desired area as navigated to at https://download.geofabrik.de/ .

  5. Change “http://map.atownsend.org.uk” and “https://map.atownsend.org.uk” throughout to something that matches the name or address of the machine to serve things from. It can be https if you have a valid https certificate. For testing, a web server on an IP address will work, perhaps something like “http://192.168.1.113”.

  6. Change “/etc/apache2/sites-available/000-default.conf” to whatever is the active apache config.

Then run:

sudo /usr/local/sbin/update_vector.sh

If that works it should say Filled the tileset with good things at .... If it fails try and understand why.

If it works, browse to your site. If it was just e.g “http://192.168.1.113/” then initially go there to see an “it works” page. Then go to “http://192.168.1.113/vector/” - if directory listing is enabled, you should see lots of files including index_svwd01.html.

Next, browse to e.g. “http://192.168.1.113/vector/index_svwd01.html”
You will need to zoom out, manually move the map to the area than you generated tiles for, and zoom in. The grid squares and the URL should help you do do this.

To turn off the debug and the grid squares edit index_svwd01.html and comment out the six lines below the comment “Comment the following lines out to remove debug UI”

One more thing is that if you need coastline, that’s an extra step to create (documented at tilemaker) and you’ll want to replace “nocoast” in your “update_vector.sh” script with the path to that coastline .mbtiles.

(replying to my own post but) I’ve now done this - the vector version is here and the raster version will get picked up at the next raster build.