Is it possible to serve files in SRS 4326? I am following the directions for deploying my own server, and in the section for OSM Bright I see a snippet regarding WGS84 (what I think is 4326), but that's all I see. I am able to get my tiles to display, but there's ZERO style overlayed on them. All I see is the planet without any cities, roads, etc. Am I on the wrong track? asked 28 Oct '16, 14:27 ismail44
showing 5 of 6
show 1 more comments
|
The style has a list of layers - usually in an .mml or .yml file - and each layer has projection information to go with it. Since OSMBright is made for a database imported in Mercator units, and yours is in latitude and longitude, nothing will work - in effect, your data for the whole world will crouch somewhere near "null island" in the sea off Africa. But all is not lost, you just need to inform your style that the data source is in EPSG:4326 instead of Mercator, then things will work again as expected. Look for layers configured to access the database with something like
and change that to
BUT: This whole exercise is only half of what you want. It is good that the style now knows your data source is in EPSG:4326 but you will also want to request tiles in that projection. It is no problem to use a command line tool like nik2img.py to create images in EPSG:4326 but all the standard tile generating programs like renderd etc. are geared towards the EPSG:3857 tiling scheme (where the world is quadratic). You'll have a hard time setting these standard utilities up to support non-mercator tiles because the assumption that standard mercator tiles are used is hardcoded in many places. answered 31 Oct '16, 22:47 Frederik Ramm ♦ @frederik, thanks for a very insightful comment. I am getting my tiles from osm in .pbf format and using osm2pgsql to import them. If I pass in the "-l" option, would that take care of my tile generation problem (Assuming, of course, that I fix the style's mercation)?
(31 Oct '16, 23:41)
ismail44
The maps that you can produce are (unless we're talking north and south of 85°) the same, wether you import without
(02 Nov '16, 23:37)
Frederik Ramm ♦
|
I don't think so, but it depends what track you're following. Can you tell us what you have done so far? Lot of guidance you'll find is dedicated to give you a map in Mercator, so it can be a good idea to have a small extract of OSM rendered in this projection then adapt the database and style for 4326.
I have followed the instructions for installing openstreet on ubuntu 14.04 from scratch to the letter. The only difference is that I am importing the planet with the "-l" switch in the osm2pgsql command.
Are you sure your style file works in 4326?
That's what I think is wrong... my styles aren't showing up?
Before correcting your style, maybe try to render a map in Mercator if not already done.
So... serving the tiles in spherical mercator worked just fine... I guess the trick now is going to be to find out how to serve them in lat/lon mercator... which, I would expect that I just need to find the correct .shp files for OSMBright in the correct mercator???