Hacker News new | past | comments | ask | show | jobs | submit login
Free OpenStreetMap tile library: watercolor, black and white, terrain (stamen.com)
455 points by DoreenMichele on Feb 6, 2020 | hide | past | favorite | 84 comments

I try to contribute to OSM whenever I get the chance from my smartphone. I like that others do too; often times it'll give me walking directions through a mall or whatever sometimes shaving 10 minutes off. It's only as good as it's users though, so I encourage more to contribute.

A strong recommendation here for the StreetComplete app, which makes it really, really easy to contribute: https://github.com/westnordost/StreetComplete#readme

That is a great initiative! I just installed the app and contributed some tweaks in my area.

Also, I couldn't find any info on this matter: some quests ask you what number a house is. Wouldn't people find it strange that a random person is standing in front of your house and looking at the number and then types on their smartphone?

AFAIK house numbers are not private info, but still...

Happens to me regularly, especially when I take photos of shop names, opening hour or draw building outlines (on an existing OSM map printout). The more residential the area the more questions. Of the last five questions two knew what OpenStreetMap is so that's progress.

I usually carry a few stickers on me just in case, so people can remember OSM and look it up later (after I explain what I'm doing and say it's a fun community project).

you can just apologise for the inconvenience and move on if anything happens, it's not like they can call the police or anything

> it's not like they can call the police or anything

Well, they can. Whether or not the police will bother doing anything can depend on a lot of factors.

Anything like this for iPhone?

I use OSMAnd and Go Map!! to make edits.

Go Map!! is particularly good for editing, while OSMAnd is a more full-featured map application which also supports editing.

Yeah, I love OSMAnd for that reason. With it, you can add POIs and for more complicated edits that need a bigger screen etc. it's easy to add OSM Notes (which other mappers can then follow up on). Notes I find particularly good when I'm travelling and don't have time or enough knowledge of the area to actually edit the map, but want to help others do so.

Go Map! is indeed a fine app. But it does require some OSM knowledge, like the various tags. In that regard the linked Android app is a lot simpler.

Not for contributing/editing, but for an offline map set with CarPlay, I use Magic Earth.

The routing algorithms are okay though.

Agree! Can't be easier than this!

Sadly these maps still have our driveway as a "road."

Years ago I heard that Apple was going to use OSM data for their map app. I contacted OSM to remove our driveway. They did demote our driveway to a "private road" (the best I could do). Luckily, our driveway is not in the Apple maps app. I am still somewhat irritated particularly when I see our driveway in apps like this.

You could sign up for an OSM account (it is free) and edit your driveway so it is no longer a 'road' but is instead labeled as a driveway.

Hopefully you'll make a few more corrections as well, but even if this is the only edit you make, it is a contribution to the whole.

I am an OSM contributor and could try to fix it for you, if you give me the location. My email address is in my profile.

Thank you for your kind offer to fix my driveway. I just sent you an email.

FWIW, OSM lists both my and my neighbors' long driveways as "service roads." (Which isn't an obviously incorrect classification although the actual mapping doesn't seem wholly accurate.)

The proper way to map a private driveway in OSM is `highway=service,service=driveway,access=private`. I can see why you, or a simplistic data consumer, would class that as “service road”

So, as I read it above and in the Wiki, I gather that driveway is a subset of service road? (Actually, in my specific case, it's a little more complicated in that the access to a couple houses and a couple outbuildings are interconnected so it should probably be tagged 'driveway=pipestem' as well.)

Refinement is probably a better word than subset, because it depends on how the data gets used; if someone makes a map that interprets all highway=service the same way, driveways will look just like all the rest. If they interpret service=driveway in addition to highway=service, then they will look different.

That's a bit like complaining your front door is still green. If you don't like what the person before you did, you're in charge of changing it. Power to you ;)

It was probably initially added as part of an import of US Census data (TIGER).

TIGER doesn't have all that much differentiation for minor roads, and the import didn't do anything other than a direct mapping of TIGER classes to specific sets of tags. For unnamed residential streets, it probably should have considered things like length and connectivity to downgrade a bunch of streets/roads.

None can surpass the Spinal Map tile library https://www.thunderforest.com/maps/spinal-map/

There's a few Easter eggs in the place labels that are worth seeking out...

"Atlantic City of Rock" is one of my favourites, but there are more!

Hull, MA, USA is now Hell

Why do many online maps like Google have so little contrast? It's very different to printed maps over here. You basically have a really hard time seeing the white roads on the light grey background, especially when looking at the display from some angle.

Google Maps is now a business directory with a map interface.

The highest contrast is reserved for business that are paying Google for advertisements, followed by other shops, hotels, restaurants and bars.

Everything else, but especially roads and railways, are desaturated into mush.

Compare Streetmap UK[1], which was the first popular online mapping service for the UK in 1997. The web design has hardly changed, and up to the linked zoom level they're still showing the standard (government-produced Ordnance Survey) "paper" maps.

[1] https://streetmap.co.uk/map.srf?x=531405&y=181525&z=115

I'm somewhat sure that the low contrast predates advertisement on maps by several years. I also doubt Google would willingly compromise Maps's usability for the sake of advertising, especially right from the start where there is enough low-hanging fruit and revenue is bound to be negligible. That would be like plastering ads over the google.com homepage, something they continue to resist two decades in.

My money is on either a wish to make (all kinds of) labels stand out, or just aesthetic preferences. FWIW I always found OSM to have too much contrast (and too much details), and the emergence of all these services rebranding OSM in different styles would seem to be evidence for other people also considering OSM's default style to leave room for improvement.

> You basically have a really hard time seeing the white roads on the light grey background, especially when looking at the display from some angle.

Also how past a certain zoom level forests simply vanish and the distinction between built-up areas and "open space that isn't a park" (which isn't too great to start with) gets smaller and smaller until it's virtually impossible to distinguish.

I just tried this, and it's somewhat strange? Zoom out until you can see the globe, and forests are shown. Zoom in one step, and forests are all but invisible. As you continue to zoom in, contrast is all over the place.

Turning on terrain mode does, however, increase contrast for every zoom level.

It's even more annoying that they reuse the same color scheme for Android Auto - the Maps map is significantly less contrasty than my Mazda's built-in car nav and it's also significantly less glanceable.

It's the fashion nowadays. Flat, low contrast UIs are all the rage.

That’s wrong from the accessibility point of view. Isn’t this more to hinder the usability of printed maps and somehow enforce copyright ?

Alas, accessibility seems to take the back seat lately. Gray-on-grey designs, non-button buttons, mystery meat controls: it all looks cool, supposedly.


If you like high contrast mapping try https://www.opentopomap.org/ which uses OSM data.

There's a very good reason: because they're mostly used as the background to the location of spots you're searching for, or driving/transit directions.

Your search pins or path are foregrounded with excellent contrast against the map because this is what people are looking for 99% of the time.

These days, it's very rare to use an online map just as a map to "browse". Obviously you still can, but it's probably like 1% of the time. And the "low contrast" version still works for that, it's just not optimized for it.

For online maps I'd guess that placing an emphasis on navigation instead of exploration/discovery means that the navigation route as well as your current position on it should be always clearly visible. The map underneath then get desaturated and toned down enough to never interfere with that. Whereas paper maps never had the problem that you want to see an overlay amidst all the map lines.

They could just turn down the contrast for navigation only.

Some of the Stamen maps were created for showing data on top (actually sandwiched). You don’t want the data to visually mix with the underlying map.

Sadly, these tiles haven't been updated for several years. They are beautiful though. Probably best used for zoomed out maps.

Does anyone here know about the process of updating a tile set?

In the case of Stamen, the process consists in installing Tilemill (the project is originally from Mapbox but it's been forked because Mapbox has changed its rendering/cartography technology since then: https://github.com/tilemill-project/tilemill) and then cloning the Stamen project (https://github.com/stamen/terrain-classic). From there, you can follow instructions, tweak the Makefile, etc. The source of the data is OpenStreetMap and NaturalEarth so even if you don't want to change the theme you may at least update the data sources.

The process is quite complex, you'll also need a PostreSQL database with the GIS extension installed to ingest data from OpenStreetMap. A quite powerful server and a lot of RAM are required to be able to do the rendering efficiently.

Unless you need to do that, I wouldn't suggest trying. It's a nightmare with several sets of contradictory, overlapping out of date docs needed to do the whole thing properly. Then of course it breaks and you don't know why. It used to be that tilemill kinda nailed it but that just went away.

Tileoven was the working fork for awhile but it seems plain Tilemill is back

I know some people moved to https://github.com/kosmtik/kosmtik after tilemill stopped being developed.

For those interested, carto also has some lovely OSM tiles


OpenStreetMap is one of the greatest open source initiatives out there.

Thunderforest has a free tier that has served my hobby projects for years. https://www.thunderforest.com/maps/

The tile set I've been unable to find is an overlay of all roads, suitable for drawing on top of satellite and terrain maps. Are there any? There aren't any listed on https://wiki.openstreetmap.org/wiki/Tile_servers

If you use vector tiles, you can use any of the major providers:

- Mapbox (https://mapbox.com)

- MapTiler (https://maptiler.com)

- Stadia Maps (https://stadiamaps.com)

- https://switch2osm.github.io/providers/

…then you style / display only the road data and exclude the rest of the data and overlay that on your tiles.

(Note: I'm co-founder of Stadia Maps.)

The Toner style from Stamen has several different layers that you can use to accomplish what you're talking about:

- Hybrid does exactly what you're looking for: http://maps.stamen.com/toner-hybrid/#12/37.7706/-122.3782

But they also break that down into labels and lines:

- Labels: http://maps.stamen.com/toner-labels/#12/37.7706/-122.3782

- Lines: http://maps.stamen.com/toner-lines/#12/37.7706/-122.3782

Their Terrain style has a similar separation:

- Lines: http://maps.stamen.com/terrain-lines/#12/37.7706/-122.3782

- Labels: http://maps.stamen.com/terrain-labels/#12/37.7706/-122.3782

- Background: http://maps.stamen.com/terrain-background/#12/37.7706/-122.3...

I would be curious to see how much memory would be saved if those tiles would use 1bit black and white.

I just tried saving one of those shade-of-grey "Toner" tile to "4 grey" in xnview, which I guess is a 2bit PNG, meaning it would use 4 shades of grey, so black, white, #555 and #AAA.

The tile went from 32kb to 6kb, so a 80% size reduction.

I'm really curious if this would allow one to store a country region with tiles on a smartphone. OSMand lets you download vector maps to browser them offline, but rendering can be a little slow on some phones.

EDIT: OSM tiles use a 256 colors palette, most tiles less than 10kb. I guess there are tools out there to generate a 8, 16 or 32 colors palette. XNView seems to use libimagequant to generate a palette.

Also, if you have the CPU cycles to spare, optipng (http://optipng.sourceforge.net/) can often find a nice reduction in size without having to change the actual image at all.

The current state of the art for small tilesets is to store vector data in tiles on the device, then render to raster there. It's way, way smaller than any realistic raster image.

sure but it's also slower to render

Hm, interesting. Thanks for idea. I think I will spin some script and imagemagick on tiles I just downloaded.

Remember than PNG compress data like it would for text, using DEFLATE:


What doesn't change is raw data. In general maps are not like photography, maps are simplified diagrams so that things can be easily distinguished, and that makes them much easier to compress using lossless methods, so using a reduced amount of colors will not be really noticeable, especially if colors are properly chosen.

Look at the palette of an OSM tile: https://i.imgur.com/ecaP17l.png

Using a 8 color palette instead of 256 on xnview results in a 50% reduction. A 16 color palette results in about 40%, but the result is much better. So it does save memory but not that much.

I love the watercolor map. I seareched how they do this but I don't understand how they do it

The sources are here: https://github.com/stamen/watercolor. You can import the project into Tilemill (https://github.com/tilemill-project/tilemill).

Hi. I work for Stamen. We have a very old blog post that goes into more detail about how we made these tiles: https://hi.stamen.com/watercolor-process-3dd5135861fe

Could someone lend a hand and tell me where can I find OSM Carto tiles legend? As in colors for different tag combinations? I am trying to build something that requires a custom legend.

There's a page dedicated to the current OSM Key on their wiki https://wiki.openstreetmap.org/wiki/Standard_tile_layer/Key.

Is it what you're looking for? Apart from that, the page for each tag will show the corresponding marker or colorcode in the OSM theme.

Thanks, something like that (I have seen that page though), but in a script form (which I didn't find so far). I certainly would not want to have to render a bogus map myself to extract similar images. Maybe I will just scrape it out of the page.

I'm not sure what you mean by "in a script form". In any case, the "authoritative" source of the template served by time.openstreetmap.org is this GitHub: https://github.com/gravitystorm/openstreetmap-carto

In script form=a script that generates a list of tiles with localised terrain names, given a list of tag combinations as on the page you mentioned earlier. I probably have to look better around their repos. Both links you have given so far have already proven useful elsewhere. Maybe I just have to render a map with a bunch of squares and make them into tiles. Thanks anyway!

Out of interest, do non-British English readers understand "Map key" as a synonym for "Legend"? I've always called it a "key" (as a British English speaker) but Americans often don't seem to understand this.

American here, I've heard both "Map Key" (or just key) and "Legend" used interchangeably for map Keys/Legends for as long as I can recall. So I suppose there's more to it than just American vs. British English.

Legend is the more common usage in the US in my experience. Map key, like car park, seems a bit more awkward to American ears but is self-explanatory and obvious in it's meaning.

It's legend for me. Map key might sound more self-explanatory for an English speaker who is not into maps though.

Yes, I am Canadian and that usage seems quite natural to me.

Be that as it may, but REM's "Maps and Legends" is a great song.

Sweet! My first thoughts when I seen this. https://community.glowforge.com/t/1871-denver-map-on-granite...

Anyone else notice that when you update OSM, Google maps miraculously updates too?

Er, no. Do you have evidence that Google Maps is copying data from OpenStreetMap? Because if you do, please document it. It would be a bombshell.

I have not noticed that. In fact, I have mapped entire road networks in OSM that are still not in Google Maps one year later.


On which device and OS?

What tools do people like for generating tiles themselves?

I found one powerful one that I liked quite a bit, but it was primarily written for generating sea charts and never put labels on open polylines.

I really like the Toner style. Simple, and high-contrast.

US is hell now

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact