This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Setting up my own tile server

1

Hi I followed the following tutorial: http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/ to set up a tile-server on my ubuntu machine.

It seems to work the same as how the tutorial says it should i.e. If I navigate to http://localhost/osm_tiles2/0/0/0.png I get a image of the world.

One of my questions is where is the folder: osm_tiles2? I have run numerous searches but can't find it anywhere. I am not sure where apache2 goes to when I type localhost.

Another question is where do I go from here to get the map data stored in the PostGIS database to load instead of the picture of the world? The tutorial loads the whole planet OSM into a PostGIS DB and I decided to load just a single city however only the small png of the world displays.

Thanks

asked 27 Oct '12, 16:02

srose's gravatar image

srose
161101016
accept rate: 0%


One Answer:

1

"osm_tiles2" is defined in /usr/local/etc/renderd.conf:

[default]
URI=/osm_tiles2/

The "osm_tiles2" folder doesn't actually exist. The tiles aren't stored as .png files on disk - they're stored as metatiles below "/var/lib/mod_tile/default".

If you actually want to generate some real tiles you can do so with "generate_tiles.py" (in the mapnik-style folder).

If you've followed the instructions you'll already have your imported data in the database. If you want to quickly check that the city that you've imported is in there, navigate to it on the main OSM site, zoom in quite a lot, and right click and select "view image". You'll get a URL like:

http://a.tile.openstreetmap.org/16/32486/21104.png

Change that to the equivalent one on your tile server:

http://localhost/osm_tiles2/16/32486/21104.png

and (after a short time rendering) you should see part of your imported city.

On the switch2osm site there's also a "serving tiles" section that allows you to set up a slippymap like the main OSM site.

answered 27 Oct '12, 17:22

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Source code available on GitHub .