mapproxy / mapproxy

MapProxy is a tile cache and WMS proxy
http://mapproxy.org
Apache License 2.0
564 stars 258 forks source link

Incorrect projection #165

Closed roboguy closed 9 years ago

roboguy commented 9 years ago

I've been trying to setup a WMS proxy for my tile server. But the tiles returned in mapproxy look stretched out as you head north or south.

Here is the sample YAML I'm using.. ervices: demo: wms: srs: ['EPSG:4326'] image_formats: ['image/png'] md: title: MapProxy WMS Proxy abstract: This is a minimal MapProxy example.

layers:

caches: osm_cache: grids: [osm_grid] sources: [osm_tiles]

sources: osm_tiles: type: tile grid: osm_grid

use of this source is only permitted for testing

url: http://localhost/default/%(z)s/%(x)s/%(y)s.png

grids: webmercator: base: GLOBAL_WEBMERCATOR osm_grid: base: GLOBAL_MERCATOR origin: nw

globals:


image

quiqua commented 9 years ago

You are displaying your data in EPSG:4326. If you remove the line srs: ['EPSG:4326'] in the service section, you get all default enabled SRS for MapProxy (including 4326 and 3857/900913). You could also set the EPSG code to the appropriate number.

Have a look at the full_example.yaml generated by the mapproxy-util create -t base-config my/config/dir command.

roboguy commented 9 years ago

Hi quiqua, Thanks for replying. I wanted to display the data in EPSG:4326 that is the main requirement. Other SRS's are not required and I didn't want to increase complexity in the config. From the full_example.yaml i was able to change it to a mapnik source. I am still getting the elongated tiles shown above with EPSG:4326, whereas EPSG:3857 works fine. Another issue I'm having is that its accessing the database as a single process, hence very slow to return tiles.

This is the updated config below:

services: demo: wms: bbox_srs: ['EPSG:4326'] image_formats: ['image/png'] md: title: MapProxy WMS Proxy abstract: This is a minimal MapProxy example.

layers:

sources: osm_tiles: type: tile grid: osm_grid

use of this source is only permitted for testing

url: http://localhost/default/%(z)s/%(x)s/%(y)s.png

mapnik_source: type: mapnik mapfile: /home/ubuntu/src/tango-analytics-map-styles/combined/project.xml concurrent_requests: 8 transparent: true grids: webmercator: base: GLOBAL_WEBMERCATOR osm_grid: srs: 'EPSG:4326' origin: nw

globals:

Am I missing something with the grid settings ? I apologies for my ignorance on this, I'm new to projection systems.

quiqua commented 9 years ago

If you want/need to display the map in 4326, then the displayed map is correct.

Here are some projection examples, have a look at them: Projections.

roboguy commented 9 years ago

I understand, i got confused by the EPSG codes.. I was looking at an EPSG:3857 map and wondering why this one looked like that. That link is really helpful!.

This issue can be closed..