
Switch to OpenStreetMap - chippy
https://switch2osm.org/
======
ajsnigrutin
Ok.. i want to serve tiles... ok, I go here: [https://switch2osm.org/serving-
tiles/](https://switch2osm.org/serving-tiles/)

First option (Build a tile server using packages) ... i click on it.. ubuntu
packages... i don't have ubuntu here, let's go back.

Second option (Build a tile server from source), takes me here:
[https://switch2osm.org/?page_id=76](https://switch2osm.org/?page_id=76) ...
where is the documentation? How do i build it from source?

Ok fsck it, let's try the "all in one solution"...
[https://switch2osm.org/serving-tiles/using-an-all-in-one-
sol...](https://switch2osm.org/serving-tiles/using-an-all-in-one-solution/)
... "Page not found"

So.. either install ubuntu, or figure it out by myself?

~~~
jmnicolas
I tried to build my own OSM server a couple months back. I quickly abandoned
when I discovered that the amount of processing to import their world map data
file in Postgres would require several months (desktop Core i7 3770k / 16 GB
ram but a 7200 rpm hard drive since there wasn't enough space on my SSD).

For a world map server you would need a beefy machine to make it less painful,
something like 64 GB ram, multi nvme ssd and countless cores.

I wish they offered a Postgres dump of it.

~~~
nathancahill
Hmm, I run a handleful of OSM servers with similar specs and it takes a little
a day or 2 to import the world to a HDD. Here's some benchmarks. It definitely
helps to have a beefy server:
[https://wiki.openstreetmap.org/wiki/Osm2pgsql/benchmarks](https://wiki.openstreetmap.org/wiki/Osm2pgsql/benchmarks)

A Postgres dump would be massive.

~~~
growlist
> A Postgres dump would be massive.

Indeed - it inflates to hundreds of GB during my import process.

------
moksly
Has bug-correcting editing improved over the years? We use OSM quite a bit in
the public sector because they aren’t snooping. Three years ago one of our
internal routing systems broke because someone had reported the street leading
up to our administration center as a one-way street in the wrong direction.

This meant our 7000 employees couldn’t get compensation for any work related
driving, and we couldn’t submit the correct tax-records.

When I submitted my correct edit, I was banned because my account was new and
I had submitted a evidence from our internal street planning system, where we
mapped the direction of the street, which is proprietary to us. Heh, it took
two weeks to get it fixed after that because every subsequent edit got denied.
Which felt kind of silly, considering it was my department who decided the
street should become a one way street in the first place. Really needed a
“verified” account system.

Considering I haven’t needed to correct anything since is a testament to its
quality though.

~~~
Doctor_Fegg
Puzzled by this. It's really really unlikely that you got a ban for one
editing error. You can see the list of blocks at
[https://www.openstreetmap.org/user_blocks](https://www.openstreetmap.org/user_blocks)
and actual bans are only imposed for _repeated_ vandalism, edit-warring or
copyright infringement. Short-term user blocks are generally imposed if the
user isn't responding to attempts to contact them.

Do you have a link for your changeset and what happened?

~~~
ltc5505
Wow, the documents for the user blocks are very thorough. Here is a fun
snippet that (blocked) user sorein sent to the OSM Data Working Group:

"YOU MORON WHO PROMISED T INTERMEDIATE BETWEEN ME AND THE GYPSIES TAKING OVER
IN THE ROMANIAN NEWSLETTER, AND THEN YOU JUST RUDELY FORGOT NEED TO STOP!!! GO
DO A JOB FOR WHICH YOU ARTE QUALIFIED"

------
nathancahill
Timely. Just started a project to document Bosnia and Hercegovina's remaining
minefields on OSM. The build system consumes PDFs from the European Union
Force as they are updated, georeferences them and pushes the features to OSM.
Many tile sets on live maps are updated within the week!

~~~
chrisseaton
> Just started a project to document Bosnia and Hercegovina's remaining
> minefields on OSM.

That's brave - one bug and you could have people walking into a minefield that
you've told them was somewhere else.

~~~
rpastuszak
Arguably better than nothing—kudos to nathancahill for doing something
genuinely meaningful.

~~~
jackpirate
Also arguably worse than nothing as it could make people living in the area
more complacent.

In this case, I think it really depends on the use-cases and whether proper
warnings are displayed.

~~~
nathancahill
I mean, you wouldn't just drive in to a lake if it wasn't on your map..
[https://www.youtube.com/watch?v=DOW_kPzY_JY](https://www.youtube.com/watch?v=DOW_kPzY_JY)

------
grecy
For anyone that doesn't know, it's trivial to load OSM onto a Garmin GPS and
use is for turn-by-turn navigation, for free.

I've used it in over 40 countries (including Africa, Europe, North America)
and it is _staggeringly_ complete and accurate. From the mega capital cities
to the tiniest village, it has every single dirt track, school, hospital, gas
station, roundabout, intersection, etc. etc.

I can count on one hand the number of times it hasn't been utterly perfect in
4 years of driving around 90,000 miles through 40 countries.

I have no idea how the maps can be so shockingly good in rural Ivory Coast or
Burundi, but they are.

~~~
anticodon
Some countries are mapped poorly in OSM. Examples are: Mongolia and Cambodia.
Many roads and buildings are missing.

~~~
grecy
Interesting, like I said I've never seen a country that isn't shockingly good.

I travelled extensively in 35 African countries - including a bunch you
wouldn't expect to get good data for like The DRC, Burundi, Sudan, Mali,
Gambia, Djibouti, Ethiopia, etc. As well as Belgium, France, Spain, Canada,
USA

~~~
macintux
It's pretty bad in my city in the U.S., or at least was a few years ago when I
last tried to volunteer some editing time. Guess I should look again.

~~~
grecy
I just drove 35,000 miles around the US this summer through about 30 states,
and OSM had absolutely every single road, intersection and detail I could ever
hope for perfectly mapped. I used it solely for navigation in a ton of places
I've never been before, and it was brilliant.

What do you see lacking in your city?

~~~
macintux
Things may have changed, but two notable omissions at the time: a restaurant
that had been there for 30+ years, and the post office closest to me.

------
dastx
I've tried over and over again to switch to OSM but everytime I've reverted
back to Google Maps and Citymapper. I've even contributed to OSM to fix bits
I'm around but it's hard.

I don't drive so I rely heavily on public transport, and so for me that's the
biggest selling point for any such tool. Unfortunately I've yet to find an OSM
app that can do this in a useful manner as Citmapper and Google do.
Unfortunately the data is just not there, and when looking through the issues
of AndOSM, it feels there is a lot the developers just don't want to bother
implementing (and in one scenario, someone had raised a PR but they refused to
merge it). Granted, some issues are due to licensing, but many are quite
important from a usability point of view.

It's been a while since I last time tried AndOSM, or OSM on it's own for that
matter, so unfortunately I can't remember the specific cases.

~~~
lukeqsee
Maps.me is what finally has allowed me to mostly switch with offline maps,
good routing, and support for all modes of transit I use consistently.

[https://maps.me/](https://maps.me/)

~~~
tomcooks
OSMand+~ is a much faster smartphone client, that cares about your privacy and
doesn't spam you with ads.

You can find it on osmand.net, the F-Droid repository and the Play/ios store.

~~~
Mediterraneo10
There is an ad-free version of Maps.me. It is on F-Droid under the name of
simply "Maps". I would recommend it to ordinary users who might be daunted by
OSMAnd's somewhat arcane interface.

~~~
ce4
I find the interface to be really powerful once I got accustomed it, took some
time though. I use it for hiking, motorcycling, measuring distance, searching
places and public transport, etc. Its easily one of my most used apps on my
mobile

~~~
cyborgx7
It's very powerful, but, as a result, very stuffed and overwhelming. It's a
significant barrier to entry. I've seen it several times.

There is definitely a place for a much simpler app, that focuses on the most
important features and ease of entry.

~~~
ce4
I agree, i also saw it happen even with technically minded persons - but I
really hope they don't take away that powerful interface from me. I find it
invaluable since I got the hang of it.

------
samcrawford
I've been using OSM data for a side project I've been working on (an app to
find "green" running routes, avoiding busy roads and preferring
trails/rivers/parks, and optionally meeting some minimum target distance).

It just would not have been possible without OSM's data, full stop. The tag
data associated with each road ("way" in OSM parlance) is invaluable, as is
the ability to work with all of this information on a planet-scale in a single
database (I use osm2pgsql to import the whole planet into a single box with
256GB RAM, and have plenty of headroom to run my app on top of that too).

The APIs provided by Google Maps and Apple Maps do not provide the
functionality I want, even if I could pay their massive fees. Additionally,
Google Maps' mapping of trails is much worse in my experience.

Whilst the data is far from perfect in some areas, I am still extremely
grateful that OSM exists, and will now make a donation via
[https://donate.openstreetmap.org/](https://donate.openstreetmap.org/)

~~~
carstenhag
Not sure if you already know this, but you could also use data on whether the
streets are lit or not. OSMAnd uses this for example

~~~
samcrawford
Funnily enough, that is one of the features it already supports (avoiding
unlit streets). Another one is avoiding especially hilly routes.

~~~
asdf21
Is "hilly" a simple binary indicator on each street (or section of road) or is
there an entire layer of elevation data included in the world data?

~~~
samcrawford
In my app, yes, it's a binary flag. But in the underlying data you can get
detailed elevation data for every section of road worldwide that is readily
usable in open source routing engines. GraphHopper supports STRM and CGIAR
(two different data elevation data sources, available globally and free to
use).

~~~
pastage
SRTM is pretty bad, but good enough until height data is easier to work with.

------
jillesvangurp
There are also some nice services using OSM data. E.g. one of my friends runs
the opencage geocoder which uses open data. Also there's at least one good
navigation product out there (graphhopper) that I know about. There are
several companies providing map tiles. And depending on what country you are
in, OSM data may actually be superior. E.g. OSM data in Germany is
ridiculously detailed compared to just about everything else. Lots of slums
have detailed OSM maps when most other provider just show a blank space.

If you stare a lot at maps for the Bay area, this is about as good as it gets
for e.g. Google and Apple maps. Don't assume you get the same level of detail
everywhere. Making maps is complicated and expensive. OSM is pretty
competitive in many places and the best there is in quite a few other places.
And if that's not the case, the locals can fix it, if they want to.

------
davidmurdoch
I evaluated OSM for an AR real-world strategy game (like pokemon go) I was
building years ago (terramango.com), as implementing it would have saved
hundreds of thousands of dollars. Problem with it in the US is that so many
places don't have parcel boundaries, and if they do, they are often pretty far
off from reality. We ended up using Google Maps (cost wasn't an issue yet
because we were only in a private beta stage) and negotiated a limited free
trial for parcel data from a private supplier. The private supplier scrapes
county records (some of which are only available in person, and other
countries charge a fee for access) and their records almost always lined up
with Google's parcel boundaries, OSM did not.

Other countries I randomly spot checked did seem to have great OSM records
though.

~~~
asdf21
OSM should be big enough to scrape their own parcels / subscribe to someone
who does at this point.

I wonder if this is still an issue... AR RTS is my use case as well, and the
mapping is obviously a huge component.

I think Pokemon Go switched to OSM a couple years ago, didn't they?

~~~
rmc
> OSM should be big enough to scrape their own parcels / subscribe to someone
> who does at this point.

You do realise OSM runs on like £50,000 per year, and has basically sorta one
employee? it's not that big!

------
johannes1234321
I love using OSM, but when pointing non-geeks towards it the experience of
openstreetmap.org is not the best.

Myself I am a happy user of maps.me as an app (even paying user before they
were acquired) and have built tons of toy tools around it (basically whenever
I need to do a tech demo I use osm data queried from overpass etc.) and there
are cool things one can do ... but the shiny user-friendly thing is missing
and "don't give Google your data" for many doesn't work.

Edit/p.s. I know that openstreetmap.org is supposed to be the "developer site"
and others are supposed to build the "nice" products, but it's the entry to
the project, where the brand leads.

------
mtmail
Very recent relaunch. Their github repo if you want to contribute
[https://github.com/switch2osm/switch2osm.github.io](https://github.com/switch2osm/switch2osm.github.io)

------
lukeqsee
Tangentially, I’ve been trying to get my company on the list of providers for
upwards of 6 months to a year, and my MR and Issue in GitHub have not had any
movement.

Anyone here know someone who could help resolve that? We pretty clearly fit
the guidelines for inclusion.

~~~
Doctor_Fegg
The github-hosted site has only just gone live and the issue backlog hasn't
been addressed yet. It'll be looked at in due course I'm sure. (Have to admit
I wouldn't have chosen to submit s2o to HN until stuff's been ironed out, but
there you go!)

~~~
lukeqsee
Thanks!

I certainly appreciate the work that’s gone into it and the new
design/strategy is an excellent improvement.

------
have_faith
I recently looked into using OSM for a side project and after going down a
rabbit hole of researching 3rd party tools for generating (vector) tile sets
and how to setup a tile server I eventually gave up (my mapping knowledge is
limited to using Google Maps through their JS API). Can anyone point me in the
direction of a more complete resource/tutorial that would help? Eager to get
back on it at some point.

I clicked "Use an all-in-one solution" on the Serving Tiles page but it 404'd.

~~~
yohannparis
If you do not want to go down the rabbit hole, then Mapbox.com is the best to
start, and you can slowly learn the difference between layers, tiles,
vectorial, and their JS API is one of the best in the market.

Then once you are comfortable, move to Leaflet, while keeping Mapbox tile
service, and then build your own.

------
joegreen
Highly upvoted article about drawbacks of OSM. I think it's worth mentioning
here to give another perspective
[https://news.ycombinator.com/item?id=16394604](https://news.ycombinator.com/item?id=16394604)

------
tomrod
I just switched my non-profit to OSM (and the route-enabled OSRM). We are
loving the ability to host our own servers internally, a requirement from our
data providers.

------
ComodoHacker
With all due respect to OSM, isn't "the world’s best map data" an
exaggeration? Especially if we count satellite images as map data.

~~~
DagAgren
Satellite images are not map data in the same way that a photo of a machine is
not a blueprint.

~~~
jakemal
I think if the machine was two dimensional and the photo had a measurement
scale then it would be as good as a blueprint.

~~~
DagAgren
The machine is not, and neither is the world. Even if it were, it would still
not be as good. It would not tell you about materials, tolerances, or many
other important things.

~~~
jakemal
It isn't a requirement for a map to capture all characteristics of an area to
be considered a map.

~~~
DagAgren
That does not mean you can just leave out anything you want, though.

------
pedalpete
"Do your maps look like everyone else’s?"

This is the theme of an advertisement I'm putting together for next week.

We've built a 3D API which is used by RedBull, Microsoft, ViewRanger, Polaris,
and more to better engage their users than 2D Maps.

All the sports tracking apps look the same, so if you want to differentiate
your product, 3D maps can help tell the story. People use 3D maps for
transportation, wildlife research, commercial drone operations and more.

Check it out at [https://ayvri.com](https://ayvri.com) API at
[https://ayvri.com/pages/api](https://ayvri.com/pages/api)

------
neves
How can I, as sole map user, can help Open Street Map to thrive?

~~~
kylegordon
I find StreetComplete to be a handy tool on the phone that lets you enrich OSM
data

[https://wiki.openstreetmap.org/wiki/StreetComplete](https://wiki.openstreetmap.org/wiki/StreetComplete)

~~~
Tomte
StreetComplete is fantastic, alas there's no iOS version.

And after a while getting used to it you may want to configure the "questions"
StreetComplete asks you.

Better not answer every type of question than get discouraged or fed up with
the umpteenth "is there street lighting?".

Of course, if you can stomach being bombarded with questions every few meters,
more power to you!

~~~
skyfaller
One category of questions I have turned off in StreetComplete is questions
about wheelchair accessibility. Since I am not a wheelchair user, I have low
confidence that I can identify potential problems for them. Like, obviously
stairs are not accessible, but e.g. are the doorways wide enough?

I also turned off speed limits since it has a warning that you need to check
the entire road, not just the highlighted spot.

------
jokoon
The OSM initiative is fantastic, but only the data is good. The software
around it is low-quality, and the documentation is not good enough.

I once managed to import data exports I found on geofabrik and load it into a
spatialite database. It was not very complicated but it was difficult to find
help to understand what I was doing. But doing it felt pretty good. I still
have to test if what I loaded actually works though.

Other experience I had, trying to load vector tiles from mapbox, with the PBF
(google protocol buffers) format, in C++. I swiftly gave up. The C++ header
generated was gigantic, apparently those .mbtiles were zipped PBF in a sqlite
or something like that. It was horrendous. Mapbox seems like good software
(and we need alternative to google maps) but I don't think they help OSM at
all, at least not with the OSM model.

So in short, OSM needs some skilled engineers to work on the formats they can
encourage. GIS is not a simple subject, and I wish there was more good FOSS
for it.

Cheers to the OSMand team who can let me browse my region on my 70 euros
android without a data plan, for free! That's a lot of money saved.

No doubt I will use OSM data to generate a 3D view of the world, so I can make
a game with it. Outerra did it (they also made incredible city renders I
think), but they are not planning to release a game, what a shame!

~~~
hoseja
Do you have any recommendation for displaying vector maps in C++ (native
program, not web)? The whole field seems very confusing.

~~~
jokoon
Not at all, I don't. I tried rendering those mbtiles myself, and I failed.

You can do as I as I did, import data from exports available on geofabrik into
spatialite. And then progressively render data from spatialite (I did not try
that step).

ogr2ogr allows you to do this:

    
    
        ogr2ogr -f "SQLite" db.sqlite roads.shp -dsco  SPATIALITE=YES
    

You can find those .shp here
[http://download.geofabrik.de/](http://download.geofabrik.de/)

Then the query in spatialite, here with python:

    
    
        where2 = lambda lng, lat, dist: " where PtDistWithin(geom, GeomFromText('POINT(%f %f)', 4326), %f, 0)"%(lng, lat, dist)
        select2 = lambda lng, lat, dist: "select id, AsText(geom) from points "+where2(lng, lat, dist)

------
diftraku
It's very unfortunate the site does not have a clear path for caching pre-
rendered tiles (from OSM.org for example). The only real choices you have are
either the ones from leaflet-provider or rolling your own render server.

For something like having a single country at couple decent zoom-levels, I
would rather not go through the trouble of setting up a complete render
pipeline when pre-rendered tiles that are cached and hosted locally would
suffice.

~~~
Piskvorrr
As someone who went that route previously: "there are two hard things in
computer science: cache invalidation and whatever." That one will bite you -
at best, if your tile provider allows you to "scrape" their tiles, you'll get
inconsistent data. It only goes downhill from there :(

------
bambax
A few years ago I did make my own tiles for Paris from OSM; it's pretty
exciting to be able to design everything.

But it's a lot of work that has to be redone constantly to keep up with map
changes... Not realistic for a small organization (or an individual!)
unfortunately.

~~~
Piskvorrr
Oh, it's fairly realistic for an individual with `cron`, no worries. But the
up-front setup is still nontrivial, and running a server costs at least power,
if not system administration time.

~~~
bambax
In theory you could automate generating the tiles, but you can't really
automate downloading the dataset; it's enormous (hundreds of Go IIRC) and most
of the time has to be checked by hand.

~~~
Piskvorrr
Depends on the coverage. If you wish to serve the entire world, it is indeed
massive (~100 GB indeed); but from my experience, the updates are 1.automated
and, more importantly, 2.incremental. Perhaps the technology has advanced
since you tried it... (How do you even check 100 GB of data by hand? That
seems impossible.)

That said, I am using the dataset for generating a map, but I'm only using a
country extract - which only goes up to some hundreds of MB, and updates on
the order of tens of kilobytes. Far more manageable.

------
_bxg1
I love the idea of OpenStreetMap, and I tried really hard to use it on Android
when I purged Google from my life, but the client itself was just atrociously
awful (OsmAnd). The data wasn't the main problem; most of the time it couldn't
figure out my location at all. It constantly made my device hot. It was nearly
useless as a mapping daily-driver. Now that I've switched to iOS, Apple Maps
is leaps and bounds better, which should tell you something.

It seems like a great dataset, and maybe the editing tools are better than the
consumer clients, but if they really want it to gain traction they desperately
need to put some effort into the end-user experience.

------
andridk
As a consumer, I was just looking for mobile apps. I couldn't find any on this
page.

Are there any?

~~~
mkj
Osmand for Android is pretty good, they should promote it.

~~~
lallysingh
Is there anything that renders the mapps prettier? The difference between
osmand and Google maps is jarring.

~~~
enriquto
What do you find ugly about them? I actually prefer them to google maps! Also,
the naming of the streets is often clearer (in google maps, there are too many
streets without name, even if you zoom on them). The overall user interface,
however, is often much clearer in the google app.

~~~
kristofferR
It looks like a satnav from the early '00s... No subtlety in the colors at
all.

Mapbox Streets is an example of good map design:
[https://www.mapbox.com/maps/streets/](https://www.mapbox.com/maps/streets/)

~~~
nathancahill
Mapbox is built on OSM data and has pretty nice styling. Gaia GPS is one app
that provides (among many other things) Mapbox layers on iOS and Android.

~~~
kristofferR
Hehe, I had just edited my comment to mention Mapbox, then I noticed your
reply. :)

------
omnibrain
While I managed to set up a tile server in the past, I found it nearly
impossible to find concise information on how to setup all the rest.

Especially the geocoding part to convert addresses to points on the map/geo
coordinates, or something like the search box on openstreetmap.org.

Holding the map information up to date was another topic...

------
zwieback
Hadn't looked at OSM in a while - wow the maps are gorgeous. Remind me of the
topo maps I grew up with in Germany, which are basically pieces of art.

------
lazyjones
Is Apache really an integral part of the recommended toolchain because of the
custom module or are there decent alternatives based on modern stacks?

------
ragebol
Does anyone know of a OSM tileserver running on IPFS?

------
ocodia
I wish you could just download a big bunch of pre-rendered tiles for each
country.

~~~
sp8962
a) there are more than enough companies that would be willing to provide that
as a service. Any larger country will simply be very big depending on the
maximum zoom level (there is a reason why most tile service providers don't
pre-render high zoom levels),

b) the more sensible approach would be to use pre-generated vector tiles, for
example from [https://openmaptiles.org/](https://openmaptiles.org/)

~~~
ryantgtg
We switched last year from the Google Maps API to hosting our own pre-
generated vector tiles from Open Map Tiles in a docker image (using the mapbox
api, and we're hosted somewhere in aws (not my expertise there - I get lost in
the acronyms)). It seems to strike a good balance of managing costs +
controlling our own stuff while relieving us of the burden of generating our
own vector tiles. I could not find great docs on generating them ourselves,
and as a newbie to that world I quickly gave up.

Now we just have to periodically take a fresh pull of the tile package, so our
tiles aren't too out of date.

------
EGreg
Ok how do I use OSM to calculate routes?

~~~
samcrawford
You need a routing engine on top of the OSM data. Common projects that do this
are GraphHopper, Openrouteservice, OSRM and pgRouting.

I use Graphhopper and Openrouteservice - both are very actively maintained.

