Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Following this tutorial I was able to configure a tile server correctly using a PostGreSQL/PostGIS database, osm_tiles, renderd/mapnik and osm2pgsql in CentOS 6.

The goal of this is to be able to open tiles that have been uploaded to my DB in QGIS and some interfaces like Leaflet/OpenLayers.

Actually (thanks to those people) I'm able to visualize the "World tile" that shows the server is working, using the URL x.x.x.x/{z}/{x}/{y}.png in QGIS.

QGIS

Now I would like to be able to "read" the tiles that are in my PostGIS DB (I uploaded the Benin) but have no idea how to do it...

share|improve this question
up vote 2 down vote accepted

In your screenshot, you should set CRS ID to 3857, and check Y origin top.

Then you can zoom in to get higher zoom levels.

BTW you can activate the original Openstreetmap basemap as a reference.

Apart from that, the tiles are not IN your postgis DB. You have stored raw OSM data in there, and the mapnik toolchain delivers tiles upon request to the localhost web address.

And it is NOT necessary to set up a virtual machine for that. Postgis and osm2pgsql are also working under Windows (though probably not the whole world). I create my own tiles that way, and just use a pre-rendered folder structure to add them to QGIS. Alternatively, I can query the postgis database directly, but this is much slower if you want all details.

share|improve this answer
    
Because of a bug I was looking for a solution for the CRS, thanks ! I work in a VM because I'm going to do this configuration in my society server and I don't want to break it all... It's a sort of training. So I did what you said, but in case of zooming into the Benin nothing happen – Léo Wanh 1 hour ago
    
Have you tried to add an online basemap as reference? Project CRS should be set to 3857 as well. BTW you have to remove and re-add the layer to see settings changes. – AndreJ 1 hour ago
    
ID and Project CRS have been set as you said. here is with the map reference (if you mean in this way) and with mine – Léo Wanh 1 hour ago
    
So you get at least the coastline. Does it overlap with OSM Mapnik, or is it somewhere else? – AndreJ 1 hour ago
1  
So the coastline is loaded, but nothing from the database. Have a look at the file datasource-settings.xml.inc. The last line should be <Parameter name="extent">-20037508,-20037508,20037508,20037508</Par‌​ameter> to cover the whole world. The tutorial is focused on Russia. – AndreJ 49 mins ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.