[Tile-serving] [openstreetmap/mod_tile] An error occurred while loading the map layer (Issue #472)

Prasanna Kumar notifications at github.com
Thu Jan 2 09:45:25 UTC 2025


I am follwing Switch2OSM link (https://switch2osm.org/serving-tiles/manually-building-a-tile-server-ubuntu-24-04-lts/) for tileserver implementation & I am getting the following error:

root at forlinx:/run/media/mmcblk1p1/tileserver# su - _renderd -c "renderd -f -c /etc/renderd.conf"
** INFO: 14:49:55.349: Rendering daemon started (version 0.7.1)
** INFO: 14:49:55.350: Initialising request queue
** INFO: 14:49:55.350: Parsing config file: /etc/renderd.conf
** INFO: 14:49:55.351: config renderd: unix socketname=/run/renderd/renderd.sock
** INFO: 14:49:55.351: config renderd: num_threads=2
** INFO: 14:49:55.351: config renderd: num_slaves=0
** INFO: 14:49:55.351: config renderd: tile_dir=/run/media/mmcblk1p1/tileserver/tiles/
** INFO: 14:49:55.351: config renderd: stats_file=/run/renderd/renderd.stats
** INFO: 14:49:55.351: config renderd: pid_file=var/run/renderd/renderd.pid
** INFO: 14:49:55.351: config mapnik:  plugins_dir=/usr/lib/mapnik/input
** INFO: 14:49:55.351: config mapnik:  font_dir=/run/media/mmcblk1p1/tileserver/openstreetmap-carto/fonts/
** INFO: 14:49:55.351: config mapnik:  font_dir_recurse=1
** INFO: 14:49:55.351: config renderd(0): Active
** INFO: 14:49:55.351: config renderd(0): unix socketname=/run/renderd/renderd.sock
** INFO: 14:49:55.351: config renderd(0): num_threads=2
** INFO: 14:49:55.351: config renderd(0): tile_dir=/run/media/mmcblk1p1/tileserver/tiles/
** INFO: 14:49:55.351: config renderd(0): stats_file=/run/renderd/renderd.stats
** INFO: 14:49:55.351: config renderd(0): pid_file=var/run/renderd/renderd.pid
** INFO: 14:49:55.351: config map 0:   name(s2o) file(/run/media/mmcblk1p1/tileserver/openstreetmap-carto/mapnik.xml) uri(/tile/) output_format(png256) htcp() host(localhost)
** INFO: 14:49:55.351: Initialising unix server socket on /run/renderd/renderd.sock
** INFO: 14:49:55.352: Renderd is using mapnik version 3.1.0
** INFO: 14:49:55.489: Running in foreground mode...

** (process:14161): ERROR **: 14:49:55.882: An error occurred while loading the map layer 's2o': Postgis Plugin: ERROR:  syntax error at or near "0.001"
LINE 10:       way_area/NULLIF(POW(*0.001*0.28,2),0) AS way_pixels,
                                    ^
in executeQuery Full sql was: 'SELECT * FROM (SELECT
    way, way_pixels,
    COALESCE(wetland, landuse, "natural") AS feature
  FROM (SELECT
      way,
      ('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial',
                                            'meadow', 'grass', 'village_green', 'vineyard', 'orchard') THEN landuse END)) AS landuse,
      ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" END)) AS "natural",
      ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) END)) AS wetland,
      way_area/NULLIF(POW(*0.001*0.28,2),0) AS way_pixels,
      way_area
    FROM planet_osm_polygon
    WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard')
      OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub'))
      AND way_area > 0.01*0::real*0::real
      AND building IS NULL
  ) AS features
  ORDER BY way_area DESC, feature
) AS landcover_low_zoom LIMIT 0'
  encountered during parsing of layer 'landcover-low-zoom' in Layer of '/run/media/mmcblk1p1/tileserver/openstreetmap-carto/mapnik.xml'

** (process:14161): ERROR **: 14:49:55.880: An error occurred while loading the map layer 's2o': Postgis Plugin: ERROR:  syntax error at or near "0.001"
LINE 10:       way_area/NULLIF(POW(*0.001*0.28,2),0) AS way_pixels,
                                    ^
in executeQuery Full sql was: 'SELECT * FROM (SELECT
    way, way_pixels,
    COALESCE(wetland, landuse, "natural") AS feature
  FROM (SELECT
      way,
      ('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial',
                                            'meadow', 'grass', 'village_green', 'vineyard', 'orchard') THEN landuse END)) AS landuse,
      ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" END)) AS "natural",
      ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) END)) AS wetland,
      way_area/NULLIF(POW(*0.001*0.28,2),0) AS way_pixels,
      way_area
    FROM planet_osm_polygon
    WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'grass', 'village_green', 'vineyard', 'orchard')
      OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub'))
      AND way_area > 0.01*0::real*0::real
      AND building IS NULL
  ) AS features
  ORDER BY way_area DESC, feature
) AS landcover_low_zoom LIMIT 0'
  encountered during parsing of layer 'landcover-low-zoom' in Layer of '/run/media/mmcblk1p1/tileserver/openstreetmap-carto/mapnik.xml'

---------------------------------------------------------------------------------------------------------------------------------------------------

Kindly provide me a solution to overcome the above error. Thanks in advance

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/472
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/mod_tile/issues/472 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250102/aa5905b1/attachment.htm>


More information about the Tile-serving mailing list