
Openstreetmap, a global map for worldwide insight - liotier
https://blog.mapbox.com/openstreetmap-a-global-map-for-worldwide-insight-4e041cbf1ec1
======
kristopolous
Let me plug OpenLayers, which uses OSM and is way harder to use than google
maps but once you stop hating on it you realize it can do a bunch of things
that google maps really can't and is more versatile in numerous ways - ymmv as
always.
([https://openlayers.org/en/latest/examples/](https://openlayers.org/en/latest/examples/)).

I've found it more useful for specific applications that I build because it's
far more customizable. The map truly feels like it's part of the app and not
just some mapbox or leaflet thing sitting on top of gmaps. Again, these aren't
hard facts, just stylistic preferences on my part.

The ES6 is not really a dealbreaker if you're using something more
traditional. I just make my own "map.js" that exposes the interfaces I need,
then I transpile it and include it like anything else.

I know that sounded really complicated, but my package.json is 10 lines,
that's it.

This way you can use it in a much more conventional classical way without
jumping the whole project over to ES6 syntax.

~~~
jokoon
How can I generate raster tiles myself for a specific region, so I don't have
to use planet.osm?

I can find regions on geofabrik.

~~~
bdon
Most production raster tile systems use osm2pgsql + Mapnik. These are not easy
to install. You may need to generate two or three sets of raster tiles for
different pixel densities. The total number of tiles will explode past around
zoom level 15. [https://switch2osm.org](https://switch2osm.org) is a good
intro.

The newer way to do raster tiles is to actually generate vector tiles first,
and then do the rasterization dynamically. Mapnik can do this, renderers like
MapboxGL can be run in headless mode to do this as well.

Yes, I wish this was easier too.

~~~
berkes
In addition, modern browsers can display vector tiles directly. Mobile and
apps have a somewhat harder time with this.
[https://www.maptiler.com/](https://www.maptiler.com/) has a good introduction
for this wrt Open Street Map.

~~~
jokoon
Aren't those vector tiles a little heavy, since they're likely json?

Of course I can guess a lot of data can be removed and simplified, but still,
PNG seem lighter...

~~~
durkie
It depends on the application, but I don't think they're necessarily larger in
size. I believe the format is quite compressed (Mapbox Vector Tile/MVT, which
I believe is a variant of protocol buffers).

Many vector tile encoders have wide flexibility in geometry
simplification/removal depending on zoom layer and this helps big time with
tile size. I find them to be quite nice in lower bandwidth situations because
you can overzoom them and still have them look good: if you zoom in and the
tiles for the next zoom level haven't loaded, the vector geometry is still
able to look decent, rather than pixellated like a raster tile.

~~~
nbadg
You're mixing up the formats slightly: MVT is sqlite with a particular schema;
OSM raw data is PBF with a particular schema.

~~~
durkie
Isn't mbtiles sqlite?

~~~
maxerickson
[https://docs.mapbox.com/vector-
tiles/specification/](https://docs.mapbox.com/vector-tiles/specification/)

~~~
nbadg
Yep, versus
[https://docs.mapbox.com/help/glossary/mbtiles/](https://docs.mapbox.com/help/glossary/mbtiles/)
\-- I had them backwards. My confusion might have been because of the name
similarities (mbtiles vs mvt), which took me 3 tries to even just type
correctly.

------
ximeng
The conference this is advertising is rather buried in this long article. It's
tomorrow, online and free, and the talks sound interesting and varied.
Schedule below:

[https://2020.stateofthemap.org/](https://2020.stateofthemap.org/)

~~~
yagurastation
Thanks - lol, hopefully this comment doesn't get buried as well. mapbox, ESRI,
Geotab, and Grab will have "sponsor booths" as well. See
[https://2020.stateofthemap.org/#sponsors](https://2020.stateofthemap.org/#sponsors)

------
tarsinge
A confusion that I had at first before going further into the Openstreetmap
ecosystem: OSM is not a ready to use app and some alternative to Google Maps
the app, it's a lower level database on which front-ends renderings with a
tileset can be built to serve different usages. If you go to openstreetmap.org
you will not see much, but click on "Edit" and zoom in close and you'll get a
better idea of the data layer.

Edit: to further clarify the stack, Mapbox is a collection of tools for
creating maps from OSM data.

~~~
teambayleaf
A really cool frontend for OSM is [https://mapscii.me](https://mapscii.me).
You can try it out via:

    
    
        $ telnet mapscii.me
    

(Use arrow keys to move, and a/z to zoom in/zoom out)

I was totally blown away when I first connected to it.

~~~
nanna
In awe! You can also use the mouse to navigate around like on a gui map.

------
lukeqsee
For anyone looking to migrate to an OpenStreetMap-backed map and location data
provider, [https://switch2osm.org](https://switch2osm.org) has a good overview
of how, why, and who is offering services.

I’m partial to my own (in bio), of course, but I would be happy to answer
questions for anyone looking to switch.

Respond or email me (also in bio).

~~~
fouc
Why is it hard to setup our own tile "provider" ?

~~~
bdon
Because user expectations are high for interactive web maps - zooming and
panning should retrieve new data near-instantly.

OpenStreetMap is an unwieldy but not "big" dataset - it fits easily on a
consumer grade SSD. You need to index the dataset so that retrieving a
specific slice is extremely fast - doing point in polygon tests, clipping
operations on source geometries that have tens of thousands of vertices, etc
should not happen at query time. This inevitably means pre-rendering as much
as possible.

In addition, this needs to work for every intermediate tile level when zooming
out - each parent tile covers 4 child tiles, so you need some strategy for
decimating the amount of data so that the tile sizes don't increase
exponentially as you zoom out. This is beyond a pure computer programming
problem and becomes a visual design problem as well - features such as roads
or transit layers should form a sensible hierarchy with less important
features removed.

I've been working on this class of problems for a couple years now and have a
related presentation day 2 of the conference mentioned in TFA - details in bio
if you'd like to talk more

~~~
berkes
> OpenStreetMap is an unwieldy but not "big" dataset

Do note that while not BigData big, it _is_ large. Your PostgreSQL database
(postgis) on your macbook won't be able to import `planet.pbf` in any
reasonable time (think: weeks). Your digital-ocean VPS won't have enough
diskspace to process a weekly planet.pbf and the free or cheap tier of your
RDS won't be able to handle planet.pbf either.

[http://download.geofabrik.de/](http://download.geofabrik.de/) (also one of
the StateOfTheMap conference sponsors) is a good place to find "chopped up"
downloads to avoid that: just get only your country, a province or even just
one city. On my developer env I always run everything through with
`luxembourg.pbf`. or `iceland.pbf`.Luxembourg-latest does still contain nearly
2.5 million datapoints: `osm2geojson luxembourg-latest.osm | wc -l #=>
2417784`

~~~
bdon
You are describing a problem inherent to using PostgreSQL, not OpenStreetMap
itself. My presentation is specifically about my solution to this, which can
easily import planet.pbf in 7-8 hours on a laptop with SSD, and can cut
extracts for cities and countries like you describe based on minutely data:

[https://2020.stateofthemap.org/sessions/JDNTHK/](https://2020.stateofthemap.org/sessions/JDNTHK/)

[https://github.com/protomaps/OSMExpress](https://github.com/protomaps/OSMExpress)

~~~
berkes
Indeed, a lot is due to PostGIS. I'm using mimirsbrunn[1] a lot, lately, with
Elasticsearch as storage; especially because it is fast. It does lack a
processor that listens to changesets and imports those, though; so I still
need to run a nightly rebuild of the entire database.

Thanks for pointing me to your StateOfTheMap session. I'll "attend" it for
sure.

[1]
[https://github.com/CanalTP/mimirsbrunn](https://github.com/CanalTP/mimirsbrunn)

------
geokon
Just wondering if I could get some suggestions from the community

I've been asked, preliminarily, by the lab I work for to produce an
application that will overlay daily/weekly water quality measurements on a
map. I've got no idea where to start as I've never done anything GIS - but I
do like keeping things open source. Would this be something to integrate with
OSM?

The problem seems simple and generic enough that I'd expect it can be done
with zero programming. I just need to find the right place to feed in a table
of coordinates and measurements

I know the problem spec is a bit vague, but what's a good place to start?

And if I do need to write an app, is there any way I could stick Clojure/JVM?

~~~
berkes
For more complex GIS-data exploration, visualisation and research, I'd suggest
QGIS. [https://www.qgis.org/](https://www.qgis.org/)

It is not the most userfriendly (aimed at GIS professionals) but it does have
a large, open and friendly community around it, making lots of tutorials,
manuals, introductionary material and so on.

Edit: especially your type of "problem" is what qgis is good at: you have a
CSV, maybe a postGIS database, some old scans of maps maybe; a government
provided shapefile of the waterways and so on. And with qgis you can all
project them over Google/OSM/Bing/Mapbox maps, mix, mash, filter, extract and
so on. It is a desktop software, so publishing your result would probably mean
"make some PDFs" or "render a set of PNGs" or so.

~~~
kqr
I'm a complete novice when it comes to maps, GIS, and all that. (Though I like
to consider myself technically literate in general.) I had no problem getting
started with QGIS for that stuff. It is fiddly, of course, but the software
was clear and well documented enough.

------
m-app
The last time I looked for an alternative for Google/Apple Maps some months
ago, I couldn't really find a decent OSM (or even Mapbox)-based app for iOS.
Any recommendations from anyone?

I really like the web-based Openroute Service [1] that was shared here
recently, but AFAIK this doesn't have an app version.

[1]:
[https://maps.openrouteservice.org/directions](https://maps.openrouteservice.org/directions)

~~~
globular-toast
Maps.me or Osmand. The latter is more powerful and not just a "Google maps
replacement".

~~~
zelphirkalt
I found OSMand to be terribly slow on my old phone and maps.me sort of OK-ish
in performance. My phone is quite old. Searching locations in both of them is
not perfect. One sometimes needs to know how to search for things and treat
the UI carefully, patiently waiting till it has finished showing results.

~~~
globular-toast
Searching locations (geocoding) is never perfect. Google seems to be the best
at it, though. Probably because they've put significant effort into doing that
specifically and they simply have access to more data than any other
organisation. OSM isn't about geocoding, it's about building a geographic
database of the world. Geocoding is just one application and not one that seen
a great deal of attention, relatively speaking. Personally I often use Google
maps for geocoding if I have to but most of the time I already know where I'm
going on the map so have no need for it.

------
INTPenis
I tried making an app that would leverage OSM late last year and was
disappointed at the amount of false or stale information in there.

I went into the experience thinking it was the wikipedia of maps. But it's
not, wikipedia has much better content control than this.

My theory is that it's too easy for random people to enter data into OSM. It
should require some sort of validation of the contributor.

And each contribution should have a discussion, just like wikipedia talk
pages. I know that sounds like a lot of talk pages but I believe some of those
contributions require community discussion to improve.

~~~
zelphirkalt
It sounds like a good plan, however, there is the question of how you want to
validate the map information.

Someone adds a street. What do you want to do to validate it? Is there some
international OSM team, which goes to all the locations and checks, whether
there is really a street? With Wikipedia articles it is simpler, because you
can check sources mostly online or you have experts on subjects world-wide,
not bound by location mostly.

A map of the world seems like sooo much work to keep updated, while many
Wikipedia articles can stay as they are, if they are OK now, because they
treat historical topics for example, or mathematical things. There are new
developments in those areas as well, but no one will take a wrong road when
driving, because the Wikipedia article was not updated. Or at least it is not
likely to happen. By introducing additional barriers, the update frequency on
OSM might be even lower. I wonder how many contributors there are for OSM
maps. I have personally never updated a map there and have been too lazy to
read up on how to do that.

One would have to find a clever way to validate map information, which does
not inhibit participation.

~~~
tpetry
The answer is crowd sourcing. Everything one person creates or modifies needs
to be voted on by multiple people. After x votes and y percent in favour of
the change it‘s visible to everyone. The x and y numbers could change
depending on the user‘s reputation etc.

Think of it like the stack overflow „tasks“ you are asked to do all the time:
review this question, do this, do that ...

~~~
rathel
Because of the OSM data model, changes can't be really held in "unaccepted"
state. One would run into editing conflicts[1].

On Wikipedia withholding edits until review works in some language versions
[2], but because Wikipedia pages are "atoms" that stand on their own, they
have it easier.

[1] [https://learnosm.org/en/josm/josm-conflict-
resolution/](https://learnosm.org/en/josm/josm-conflict-resolution/)

[2]
[https://en.wikipedia.org/wiki/Wikipedia:Flagged_revisions/Si...](https://en.wikipedia.org/wiki/Wikipedia:Flagged_revisions/Sighted_versions)

------
gen220
OSM is a really cool idea, and a fantastic dataset! For people curious about
what it's like to use OSM in a huge company, a couple engineers from facebook
were recently on a podcast discussing it:
[https://softwareengineeringdaily.com/2020/04/17/facebook-
ope...](https://softwareengineeringdaily.com/2020/04/17/facebook-
openstreetmap-engineering-with-saurav-mapatra-and-jacob-wasserman/)

Some interesting tidbits: FB are hyper-conscious of "graffiti-edits" that can
sometimes sneak into OSM, so they built a system to self-host the OSM data,
which periodically and _selectively_ merges chunks of data from upstream,
using fancy algorithms to flag "suspicious" edits upstream.

------
devill285
I would highly recommend to use
[http://maptiler.com/maps](http://maptiler.com/maps), they provide easy way,
how you can customize your own map. You can also host it on their cloud.
Really neat.

------
nanna
Anyone able to suggest a free approach to pull up GPS coordinates based on an
address search for an OSM/leaflet.js based app?

~~~
berkes
Are you looking for something self-hosted? Because there are tons (and tons)
of SAAS "geocoding" services around already.

If self-hosting, have a look at this
[https://wiki.openstreetmap.org/wiki/Search_engines](https://wiki.openstreetmap.org/wiki/Search_engines)
overview.

I'm biased (I help with the development and build my latest project on top of
it), but I love mimirsbrunn
[https://github.com/CanalTP/mimirsbrunn](https://github.com/CanalTP/mimirsbrunn).
Mostly because it is _fast_ , small and relatively easy to deploy (courtesy to
Rust). It uses an old (2.x) elasticsearch as backend, so that is a major
downside.

------
maelito
And this is my attempt at ranking the big french cities by pedestrian area :
[https://villes.plus/piétonnes](https://villes.plus/piétonnes)

------
faemir
This is a little tangential, but does anyone have a strong recommendation for
a good ios osm based app? Strong cycling capabilities are extra appreciated.

------
rendaw
OSM is also one of the few remaining websites on the internet that allows
bring-your-own OpenID 2.0 login! I put together a tiny personal OID server
(plug: [https://gitlab.com/rendaw/oidle](https://gitlab.com/rendaw/oidle)) and
OSM was one of the only public places I could test it...

------
markstos
The last three or four backpacking trips I've gone on, I found the OSM data
wasn't completely accurate or complete. In each case I went in and fixed it
based on other data sources like Strava Heatmap, primary source maps or
firsthand GPS traces.

OSM is good, but it's not magic. For critical uses, check a second data
source!

~~~
berkes
But that goes for any map.

Maps are, by definition, outdated. They will have mistakes. They will have
abstractions of our messy world that go awry at some point.

OSM is in some areas by far the most accurate and up-to-date source (which is
als othe reason why for several areas, both Bing maps and Apple maps use OSM
as source). In others it is not.

I often give talks about OSM and always use this: "Google, for example, wants
to make profit, their maps are just another canvas to put ads on. This is not
bad. But it does mean, that in places (I pull open a map of Tjad where Google
maps show large areas of Nothing; Tjad, is a lot of nothing -sand, really- but
it is obvious Google has no interest in making that map anything good) where
there is no money to be made, Google won't drive around with streetview cars,
they won't buy datasets to merge, and they won't spend effort improving or
validating the maps there."

------
ionwake
If I develop an app that uses openstreetmap do I need to pay a subscription to
be able to download the map tilesets etc?

~~~
Heliosmaster
OSM is a dataset. That's free and open. There are different tile servers
([https://wiki.openstreetmap.org/wiki/Tile_servers](https://wiki.openstreetmap.org/wiki/Tile_servers))
but they each have a different policy
([https://operations.osmfoundation.org/policies/tiles/](https://operations.osmfoundation.org/policies/tiles/))

In a nutshell: you can't just use them in production for your app. Development
shouldn't be a problem.

What you're talking about is precisely the commercial service that Mapbox
offers. OSM (+ some extra stuff).

Alternatively, you're free to spin up your own tile server. That way you don't
pay anyone else (but you pay your server).

------
amachefe
I have contributed heavily to google maps but have recently tried to do same
in OSM. However, that proves to be very difficult

~~~
matkoniecz
I am quite curious what was the main blocker.

------
alec_kendall
I’ve actually been creating a monetization strategy for my online website that
lets users purchase map skins in the game.

------
canistel
One feature that has impressed me is that maps are exportable as SVG. This
does comes in handy once in a while...

------
0ld
as long as they show part of my country as part of another country, i’m not
touching it with a stick

~~~
aembleton
Go and edit it!

~~~
maxerickson
Users that repeatedly edit contested boundaries are blocked from editing. So
that doesn't help with the objection.

------
lihaciudaniel
You really believes this holds any competition against Google maps?

~~~
matkoniecz
Car navigation? Locating shops? Generally no, and overtaking Google Maps is
hard in this fields.

Hiking, cycling - Google Maps is not usable, at least in places that I
visited, while OSM was great.

Doing anything interesting with data, like making own map, making map-based
decorations (I made some laser-cut maps), research involving geodata, data
analysis and anything more interesting - it requires access to data.

OpenStreetMap is allowing to do things completely out of scope of Google Maps,
so in many cases it is not even competing.

But if you are individual driving car and you are not trying to eliminate
Google from your life? Then Google Maps app is often superior.

