[MapProxy] a problem with mapnik as source

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[MapProxy] a problem with mapnik as source

Chen Barnoy
Hi all,

I am trying to set up a wms server using MapProxy 1.8.2 and mapnik, displaying osm data in EPSG:4326, on ubuntu 18.
The mapproxy demo did run ok.

With the help of this tutorial (switch2osm) I've managed to install mapnik, create a stylesheet, and it does seem to work in their described pipeline (mod_tile, renderd, mapnik, osm2pgsql and a postgresql/postgis database).

however, when trying to use mapnik as a source to wms, the map is empty in the demo page.
 
this is my configuration:
services:
  demo:
  tms:
    use_grid_names: true
    # origin for /tiles service
    origin: 'nw'
  kml:
      use_grid_names: true
  wmts:
  wms:
    md:
      title: MapProxy WMS Proxy
      abstract: This is a minimal MapProxy example.

layers:
  - name: mapniktest
    title: test layer based on mapnik
    sources: [my_mapnik_source]

sources:
  my_mapnik_source:
    type: mapnik
    mapfile: /home/chen/src/openstreetmap-carto/mapnik.xml

this is the output I get in the terminal: 

[2018-10-14 16:19:12,778] mapproxy.config - INFO - reading: /home/chen/mymapproxy/mapproxy.yaml
[info]  * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
[info]  * Restarting with reloader
[2018-10-14 16:19:13,199] mapproxy.config - INFO - reading: /home/chen/mymapproxy/mapproxy.yaml
[info] 127.0.0.1 - - [14/Oct/2018 16:19:31] "GET / HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/ HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/static/site.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/static/logo.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/?srs=EPSG%3A4326&format=image%2Fpng&wms_layer=mapniktest HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/site.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/logo.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/OpenLayers.js HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/theme/default/style.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/north-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/west-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/east-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-plus-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/south-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-world-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-minus-mini.png HTTP/1.1" 200 -
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-2'
[2018-10-14 16:19:40,441] mapproxy.source.request - INFO - API /home/chen/src/openstreetmap-carto/mapnik.xml:(-260.859375,-210.9375,260.859375,210.9375):EPSG:4326:(742,600) 200 3.2 1121

I am glad for any help,
Chen

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] a problem with mapnik as source

Travis Kirstine
This looks like a issue with mapnik not mapproxy.  I would guess that you have the incorrect path in the mapnik config or missing fonts.

On Sun, 14 Oct 2018 at 09:39, Chen Barnoy <[hidden email]> wrote:
Hi all,

I am trying to set up a wms server using MapProxy 1.8.2 and mapnik, displaying osm data in EPSG:4326, on ubuntu 18.
The mapproxy demo did run ok.

With the help of this tutorial (switch2osm) I've managed to install mapnik, create a stylesheet, and it does seem to work in their described pipeline (mod_tile, renderd, mapnik, osm2pgsql and a postgresql/postgis database).

however, when trying to use mapnik as a source to wms, the map is empty in the demo page.
 
this is my configuration:
services:
  demo:
  tms:
    use_grid_names: true
    # origin for /tiles service
    origin: 'nw'
  kml:
      use_grid_names: true
  wmts:
  wms:
    md:
      title: MapProxy WMS Proxy
      abstract: This is a minimal MapProxy example.

layers:
  - name: mapniktest
    title: test layer based on mapnik
    sources: [my_mapnik_source]

sources:
  my_mapnik_source:
    type: mapnik
    mapfile: /home/chen/src/openstreetmap-carto/mapnik.xml

this is the output I get in the terminal: 

[2018-10-14 16:19:12,778] mapproxy.config - INFO - reading: /home/chen/mymapproxy/mapproxy.yaml
[info]  * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
[info]  * Restarting with reloader
[2018-10-14 16:19:13,199] mapproxy.config - INFO - reading: /home/chen/mymapproxy/mapproxy.yaml
[info] 127.0.0.1 - - [14/Oct/2018 16:19:31] "GET / HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/ HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/static/site.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/static/logo.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/?srs=EPSG%3A4326&format=image%2Fpng&wms_layer=mapniktest HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/site.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/logo.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/OpenLayers.js HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/theme/default/style.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/north-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/west-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/east-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-plus-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/south-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-world-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-minus-mini.png HTTP/1.1" 200 -
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-2'
[2018-10-14 16:19:40,441] mapproxy.source.request - INFO - API /home/chen/src/openstreetmap-carto/mapnik.xml:(-260.859375,-210.9375,260.859375,210.9375):EPSG:4326:(742,600) 200 3.2 1121

I am glad for any help,
Chen
_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
Reply | Threaded
Open this post in threaded view
|

Re: [MapProxy] a problem with mapnik as source

Lukas Macur
Hello, I've had this problem too. What helped me was to remove these fonts from gravitystorm/openstreetmap-carto fonts.mss and it runs without warning or any other problem or I don't see the problem yet :-)

After I migrated to mapproxy / mapnik inside Docker I have now many more missing fonts even if fonts seems installed in container, so I'm investigating.

Regards,
LM


ne 14. 10. 2018 v 21:53 odesílatel Travis Kirstine <[hidden email]> napsal:
This looks like a issue with mapnik not mapproxy.  I would guess that you have the incorrect path in the mapnik config or missing fonts.

On Sun, 14 Oct 2018 at 09:39, Chen Barnoy <[hidden email]> wrote:
Hi all,

I am trying to set up a wms server using MapProxy 1.8.2 and mapnik, displaying osm data in EPSG:4326, on ubuntu 18.
The mapproxy demo did run ok.

With the help of this tutorial (switch2osm) I've managed to install mapnik, create a stylesheet, and it does seem to work in their described pipeline (mod_tile, renderd, mapnik, osm2pgsql and a postgresql/postgis database).

however, when trying to use mapnik as a source to wms, the map is empty in the demo page.
 
this is my configuration:
services:
  demo:
  tms:
    use_grid_names: true
    # origin for /tiles service
    origin: 'nw'
  kml:
      use_grid_names: true
  wmts:
  wms:
    md:
      title: MapProxy WMS Proxy
      abstract: This is a minimal MapProxy example.

layers:
  - name: mapniktest
    title: test layer based on mapnik
    sources: [my_mapnik_source]

sources:
  my_mapnik_source:
    type: mapnik
    mapfile: /home/chen/src/openstreetmap-carto/mapnik.xml

this is the output I get in the terminal: 

[2018-10-14 16:19:12,778] mapproxy.config - INFO - reading: /home/chen/mymapproxy/mapproxy.yaml
[info]  * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
[info]  * Restarting with reloader
[2018-10-14 16:19:13,199] mapproxy.config - INFO - reading: /home/chen/mymapproxy/mapproxy.yaml
[info] 127.0.0.1 - - [14/Oct/2018 16:19:31] "GET / HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/ HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/static/site.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:34] "GET /demo/static/logo.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/?srs=EPSG%3A4326&format=image%2Fpng&wms_layer=mapniktest HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/site.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/logo.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/OpenLayers.js HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/theme/default/style.css HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/north-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/west-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/east-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-plus-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/south-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-world-mini.png HTTP/1.1" 200 -
[info] 127.0.0.1 - - [14/Oct/2018 16:19:39] "GET /demo/static/img/zoom-minus-mini.png HTTP/1.1" 200 -
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-0'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-1'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'Noto Emoji Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinA Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'HanaMinB Regular' in FontSet 'fontset-2'
Mapnik LOG> 2018-10-14 16:19:39: warning: unable to find face-name 'unifont Medium' in FontSet 'fontset-2'
[2018-10-14 16:19:40,441] mapproxy.source.request - INFO - API /home/chen/src/openstreetmap-carto/mapnik.xml:(-260.859375,-210.9375,260.859375,210.9375):EPSG:4326:(742,600) 200 3.2 1121

I am glad for any help,
Chen
_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy
_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy

_______________________________________________
MapProxy mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapproxy