[MapProxy] Reprojecting to EPSG:4326 cuts data at prime meridian.

Marc Monnerat procrastinatio at gmail.com
Mon Sep 7 12:52:45 PDT 2015


Hello,

I am using MapProxy 1.8.0, the problem is seen both running under Apache
2.2 and `mapproxy-util serve-develop`.

The "minimal" config reproducing the error (test.yaml) should end with such
an image, with not data west of Bern (exactly on 600'000m), when using
epsg:4326 (both WMS and WMTS)



​

I did the following requests against mapproxy-util serve-develop --debug -b
127.0.0.1:9001 mapproxy/test.yaml,using the mapproxy config in attachment
(test.yaml)


*WMS*

*Both the EPSG:4326 and EPSG:4258 have truncated images west of Bern*


http://localhost:9001/service?LAYERS=ch.swisstopo.pixelkarte-farbe_20151231&FORMAT=image%2Fjpeg&SRS=EPSG%3A4258&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=3.2209693748826,44.022010038859,12.747055982558,48.753510009559&WIDTH=1208&HEIGHT=600


http://localhost:9001/service?LAYERS=ch.swisstopo.pixelkarte-farbe_20151231&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=3.796635204651,44.219155870071,13.322721812327,48.950655840771&WIDTH=1208&HEIGHT=600



*In the opposite, the image in EPSG:3857 is fine:*


http://localhost:9001/service?LAYERS=ch.swisstopo.pixelkarte-farbe_20151231&FORMAT=image%2Fjpeg&SRS=EPSG%3A3857&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&BBOX=368677.88243586,5636562.1333018,1499245.0927522,6198102.1384258&WIDTH=1208&HEIGHT=600





*WMTS*


*As observed with WMS, data west of Bern are missing, as in these two tiles
(EPSG:4326 and EPSG:4258)*


http://localhost:9001/wmts/1.0.0/ch.swisstopo.pixelkarte-farbe/default/20151231/epsg_4326/8/266/61.jpeg


http://localhost:9001/wmts/1.0.0/ch.swisstopo.pixelkarte-farbe/default/20151231/epsg_4258/8/266/61.jpeg

*In the opposite, the image in EPSG:3857 is fine, the whole area is
displayed:*


http://localhost:9001/wmts/1.0.0/ch.swisstopo.pixelkarte-farbe/default/20151231/epsg_3857/8/133/90.jpeg


So if I shift the meridian to the west, so that the whole area of interest
is east of the meridian( from the official epsg file):

<21781> +proj=somerc +lat_0=46.95240555555556 *+lon_0=7.439583333333333*
 +k_0=1 *+x_0=600000* +y_0=200000 +ellps=bessel
+towgs84=674.4,15.1,405.3,0,0,0,0 +units=m +no_defs  <>

into (something very unprecise)

<21781> +proj=somerc +lat_0=46.95240555555556 *+lon_0=6.0* +k_0=1
*+x_0=450000 *+y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0
+units=m +no_defs  <>

everything is fine, but that not the goal.


I hope, it is a bit clearer


Thank you for any hints

Marc


2015-09-01 16:53 GMT+02:00 Marc Monnerat <procrastinatio at gmail.com>:

> Hello,
>
>  My goal is to reproject a WMTS source in EPSG:21781 into EPSG:4326, as a
> WMTS service (or eventually a WMS service). This is working fine for
> projection like EPSG:2056 (LV95), EPSG:3857 (webmercator) or EPSG:4258
> (ETRS89). But using EPSG:4326, I get some strange result.
>
> Checking the result in the MapProxy Demo page, using the EPSG:4326 ans the
> WMS service:
>
>
> http://mf-chsdi3.dev.bgdi.ch/mom_fix_1594/mapproxy/demo/?srs=EPSG%3A4326&format=image%2Fpng&wms_layer=ch.swisstopo.zeitreihen_20031231
>
> we find that there is *no* data West of the prime meridian of (city of
> Bern, if you know Switzerland, 600'000m easting or about 7.5° West in
> WGS84).
>
> The same layer, using the WMTS service, displays the same problem:
>
> http://codepen.io/procrastinatio/pen/XmWEZL?editors=001
>
> The prime meridian is one of the vertical purple line.
>
> In comparison, using EPSG:4258 (ETRS89), which is "almost" identical to
> EPSG:4326, data are displayed correctly both side of the meridian, as shown
> in the demo
>
>
> http://mf-chsdi3.dev.bgdi.ch/mom_fix_1594/mapproxy/demo/?srs=EPSG%3A4258&format=image%2Fpng&wms_layer=ch.swisstopo.zeitreihen_20031231
>
> We are using MapProxy Version 1.8.0 and the configuration file is
> https://raw.githubusercontent.com/geoadmin/mf-chsdi3/master/mapproxy/mapproxy.yaml
> (very long).
>
>
> If anyone has a hint, I would be glad.
>
>
> Thank you in advance!
>
>


-- 
-- Τα πάντα ῥεῖ καὶ οὐδὲν μένει

http://map.geo.admin.ch/
<http://map.geo.admin.ch/?Y=500459&X=117405&zoom=6&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.swisstopo.hiks-dufour&layers_opacity=1&layers_visibility=true&lang=fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150907/4b2b5f71/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: missing_west.jpg
Type: image/jpeg
Size: 35565 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150907/4b2b5f71/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.yaml
Type: application/x-yaml
Size: 4502 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20150907/4b2b5f71/attachment-0001.bin>


More information about the MapProxy mailing list