[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: osm-tile-server

Thanks for responding so quickly, Christopher.

> This sounds really good! I was working towards this direction also, this
> is why I packaged openstreetmap-carto. I have also written some
> documentation on the wiki as a stopgap measure until tileserving can be
> better supported through packages.
> https://wiki.debian.org/OSM/tileserver
> https://wiki.debian.org/OSM/tileserver/jessie
> https://wiki.debian.org/OSM/tileserver/sid

I have used your documentation a lot. It is highly appreciated and very useful!

> So, if I understand what you are getting at here, you don't want to
> start tilelite until openstreetmap-carto is usable.
> Now currently, usable means that the package is configured, and the user
> has selected to download the data files.
> But, as tilelite does not depend on openstreetmap-carto, if you have a
> metapackage that pulls in both of them, the packages could be configured
> the other way around, which would mean tilelite would start before
> openstreetmap-carto is configured, and the data files fetched.

What I intended with the packages I've been working on was that the
tilelite package itself does not install any daemon process, but the
"osm-tile-server-tilelite" package installs the daemon process.
osm-tile-server-tilelite depends on both osm-tile-server-base and
tilelite, and osm-tile-server-base itself depends on
openstreetmap-carto. This means that both openstreetmap-carto and
tilelite will have been fully configured before the tilelite daemon
starts. Doesn't this seem to solve the problem you describe?

> Having the data files in the openstreetmap-carto package, or a package
> it depends on would solve this, but I am not sure if this is possible at
> the moment, as one of the files downloaded is around 413MB, which might
> get rejected by the Debian archive maintainers.

I saw the same thing. The files are very big..., but isn't there a
possibility of adding some kind of dummy files for the shapefiles that
will allow tilelite to be started (but not necessary displaying the
correct coastlines etc). The user can be warned that it needs to run
the script to download updated shape files. It is just a bit annoying
that when I now install osm-tile-server-tilelite, it crashes if the
shapefiles haven't been downloaded... But I guess we have several ways
of working around this problem.

> What I would recommend currently is a multi-stage approach.
> The first stage is installing the stylesheet.
> The second stage is creating and populating the database.
> The third stage is getting the rendering and tile serving components setup.
> The reasoning behind this order is that, importing the data in to the
> database depends on having the stylesheet available (as you may need the
> style file).

Since osm-tile-server-tilelite depends on osm-tile-server-base and
tilelite, and osm-tile-server-base depends on openstreetmap-carto,
this multi-stage approach is satisfied (provided that you fully
complete the configuration of openstreetmap-carto by answering yes to
downloading the shape files).

osm-tile-server is a metapackage that depends on
"osm-tile-server-tilelite | osm-tile-server-mod-tile" (where
osm-tile-server-mod-tile is yet to be done..)

A simple:
"apt install osm-tile-server" will then setup everything.

Currently, it asks to download a test pbf file when installing
(LIechtenstein) to make sure everything works. If another region is
desired, one will have to run "dpkg-reconfigure osm-tile-server-base".
It brings up a selection of continents, and then regions (countries


> I think this could work as follows.
> $ sudo apt install openstreetmap-carto
> User inputs the string "scotland" as the name of the database, and
> selects to download the shapefiles.
> $ sudo apt install osm-tile-server-database
> The MVP (minimal viable product) for this would be to get from the user:
>  - The name of the database
>  - The location of the style file (could also give the option to use the
> default)
>  - The location of the data
> This would then create the database, and run osm2pgsql to import the data.
> $ sudo apt install tilelite
> The user then gives the details about the mapnik xml file (and the other
> information e.g. port and url).
> The tileserver is now running.
> I have found it hard to find time to work on Debian recently, and
> specifically the OSM stuff recently as I am no longer working on any
> related projects. I am going to try to get around to doing some stuff on
> openstreetmap-carto soonish though.

Reply to: