Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ok.. i want to serve tiles... ok, I go here: 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 ... 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... ... "Page not found"

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



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.


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

A Postgres dump would be massive.


> A Postgres dump would be massive.

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


> the amount of processing to import their world map data file in Postgres would require several months

I'd be surprised if this were indeed the case, even on spinning disks. Did you use the pbf export? I can load it in two or three days using osm2pgsql on my home desktop (albeit with SSDs). On the £10k+ work server it loads in about 24 hours.

The issue with providing a Postgres dump is that people often want different things from the output data, and the choices made during the import might rule out certain uses.


osm2pgsql ran a few hours for the first phase, then I let it run a couple days on the second phase (there are 3 phases IIRC).

I then calculated how long it would take to finish the second phase according to how much it had accomplished in those few days and I calculated that I would have to let my PC on until December 15 (it was back in September or October I think).


FWIW, I have been doing exactly this in the past few months, importing planet data using osm2pgsql.

It takes about 18 hours to import the whole planet onto a E5-1650v3 server, with 256GB RAM and a 1TB SSD. 128GB RAM would certainly have sufficed. The number of cores doesn't actually matter much. I've never seen it use more than 8 cores, even when I ask it to use far more.


Looks like the "Second option" link should point here: https://switch2osm.org/serving-tiles/manually-building-a-til...

The "all in one solution" link used to point to TileMill, which is no longer maintained: https://wiki.openstreetmap.org/wiki/TileMill


Good feedback, but FWIW I do believe that a docker container with Ubuntu is a no brainer. Sure policies might forbid it.


Hey I remember explicitly trying this option and the osm2pg instance died consistently after running for 4 hours. I could never figure out why. I worked on it for 4 days with no success.

I have no earthly idea how to get this to work.


Have you tried with a small extract or full planet? Processing entire dataset takes quite significant hardware, it is likely that you run into performance issues.


You might want to try with a small extract first, see how that goes.


I had this same thought.

We were building a HIPAA compliant app a few years ago. OSM looked like a good option and fit a lot of our requirements. Then I looked into actually using it and ran.

To me, it seems like there's a huge opportunity for OSM or a third party to run a managed OSM instance.


There are plenty of companies offering hosted OSM Tile servers, or are willing to install the software on your server


There are quite plenty of them.


Pardon my ignorance, but I'm wondering if anybody has experience with running OpenGIS in Postgres with one of the supported mapping servers listed on their about page? (https://postgis.net/features/)

I looked at this for a POC but was notably out of my depth and gave up. I'm not sure exactly how the tileserver OSM provides differs from the mapping servers in the link above.


I have, a few years ago. Unless things have changed dramatically, I would plan to have one full-time person work for a couple weeks to set this up, and a few weeks more if you want to set it up in a way that the map updates automatically over time. Doc is often out of date, some of the tools are unstable, the amount of data to wrangle is not trivial, and checking that your map is ok is actually not that easy, eg you might not find out immediately that the coastline is cutting across some random city in some corner of Asia.


Still, judging by the parent comment, it sounds like setting up a tile server in OSM isn't exactly trivial. Rather than editing, In my comment above, I meant PostGIS, not OpenGIS.

Anyway, I was interested in this at the time for a hobby project and (rightly) decided the effort would not be worth it. Thanks for the insight!


Depends on the level of effort you want to put into it. I've been working on a hobby project with PostGIS recently, and I've found it very easy to get started (a few hours to get PostGIS running + import just the UK's dataset using osm2pgsql). But it's taken me months to get to a point where I'd say I'm pretty experienced with it.


Awesome, thanks for the tip. Osm2pgsql looks very interesting, the docs lead me Mapnik which is pretty much what I was looking for.


Importing OSM data into PostGIS is mostly painless with imposm3, probably because it's actually documented, unlike most other pieces in the tile-serving stack. The biggest hurdle is probably understanding both the OSM and SQL way of thinking.


Interesting, a cursory glance at the git repo for imposm3 looks promising. Which also lead me to https://mapproxy.org/ which the maintainers of imposm3 also created.

I understand your comment about sql thinking, in my day-to-day work I'm a bit of a reluctant sql developer (shudders in procedural spaghetti) but am gaining appreciation for being able to hand off aggregations and calculations to the db.


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

I threw in the towel and switched my server builds to ubuntu this year for this reason.


> Ok.. i want to serve tiles

The easiest way is to use Maperitive — freeware OSM render app (for live rendering or for generating tiles on own PC).[0]

[0] http://maperitive.net


Ubuntu is the Internet Explorer of Linux distributions unfortunately.


Ubuntu is the Mozilla of Linux distributions and MacOS the Explorer.


If you're running a publicly facing service you should probably be competent enough to administer it yourself.


But they say explicitly

> If you are setting up your own tile server, we recommend that you use Ubuntu Linux.


> i don't have ubuntu here

What you have?


You are complaining that a FREE service that provides you with content while also respecting your privacy is not good enough for you.


He's complaining that the website seems to be either broken or missing necessary information. He's allowed to complain about that.


Allowed by who? I'm not talking about being prohibited to do so.


Such complaints are very useful! I am one of people involved in OSM and added this thread to my TODO to look for easy-to-fix problems.


allowed by morals and similar metrics for "justified complaining"


It's not very difficult to install Ubuntu in a VM or spin up a cloud based instance. The bigger problem is their packages work on at latest Ubuntu 14.04, which is unsupported since April and I'd guess there will be a lot of incidental bitrot that may make getting it running unpleasant.

But none of this matters, looks like there are several Docker based tile servers, which are a relative breeze to set up on any operating system.


> It's not very difficult to install Ubuntu in a VM or spin up a cloud based instance.

I don’t think that is the point OP was making. If you’re even remotely thinking about running a tile server, you’d be able to spin up a VM of Ubuntu.




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

Search: