[OSM-talk] How to create custom online map from OpenStreetMap
Carlos Cámara
carlos.camara at gmail.com
Sun Oct 22 17:47:53 UTC 2017
I would like to create a custom map for online use that loads OSM data but
displays it in different ways as the standard, cyclemap, transport...
layers.
*Some background: What I think I know so far*
I have made some research and, although I have to admit that I am still
quite confused, I have come to the conclusion that the process outline may
be the one that follows (with many variations):
1. *Get the data.* AFAIK, data can be downloaded either partially or
globally from several sources, like Planet OSM
<https://wiki.openstreetmap.org/wiki/Planet.osm> or OpenMaptiles
<https://openmaptiles.com/downloads/planet/>. If I'm not wrong, data can
be accessed online by querying it or using services like Mapbox (see below)
(correct me if I'm wrong).
2. *Style the map.* Our data has to be styled according to our needs.
Again, if I'm not wrong, there are to different (not sure if they are
excluding or not) ways to do it: either using Mapnik
<https://wiki.openstreetmap.org/wiki/Mapnik> or Mapbox GL
<https://www.mapbox.com/mapbox-gl-js/style-spec/> (more on this below).
In case that we opt for Mapnik we should create a Mapnik style (a XML file
that AFAIK has to be manually edited and seems to be quite cumbersome for
complex settings) and, in case we opt for mapbox we can use either
Tilemill <https://tilemill-project.github.io/tilemill/> or the FLOSS
editor Maputnik <https://maputnik.github.io/>.
3. *Render the map* in order to convert the data and styles into an
appealing map. This map can either be a raster map (which will generate
lots of tiles and will require the next step: tileserver) or a vector map
(which don't understand how it works other than inside mapbox). Don't know
how to do this. I assume that in case that we opt for mapnik we need to
have it installed in our server and execute a command. In case of Mapbox I
assume we need an account on their service. I have also found this
exhaustive list of rendering options on OSM's wiki
<https://wiki.openstreetmap.org/wiki/Rendering>, but haven't assimilated
all that information yet.
4. *Serving tiles:* the myriad of raster tiles that have been generated
in the previous step need to publicly available. In order to achieve that a
tileserver is needed. AFAIK, there are several options here, being Mapnik
<https://wiki.openstreetmap.org/wiki/Mapnik>, T-rex
<http://t-rex.tileserver.ch/> or OpenMapTiles <https://openmaptiles.org>
some of them. All of them require a custom server in which they need to be
installed. I'm assuming that this server requires a lot of RAM, CPU and
Disk space, but I don't have an idea of how much is "a lot" (I assume it
will vary "a lot" depending on the cover area and zoom level, but do not
have the slight idea not even for the whole world at city level zoom or
just one city area).
*Conclusion:*
Provided that everything I wrote above is true, I see three excluding
options:
1. *Mapnik* covers steps #2-#4 and needs a custom server to be installed
at and to host all the data (both, OSM data and generated tiles).
2. *OpenMapTiles* cover steps #1-#4. Needs a custom server to be
installed at and to host all the data. Apparently seems easier to setup and
run that Mapnik.
3. *Mapbox* covers steps #1-#3, since #4 is not needed, being that are
vector layers. Does not require any webserver but requires a paid account.
Don't know if it means that using Mapbox GL you are locked in Mapbox
plattform.
Don't know how does t-rex fit on this equation.
Does that make sense? Do you have some recommendations in how to achieve a
custom map?
At this point I feel quite confused, since despite things start to make
sense to me, I have the feeling that I am missing some pieces of this
complex puzzle. Not to mention that I'm not sure if I am right, though.
Regards,
Carlos Cámara
http://carloscamara.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20171022/d37617c5/attachment.html>
More information about the talk
mailing list