openstreetmap / openstreetmap/mod_tile
An error occurred while loading the map layer
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 318
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
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@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.0010.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.0010.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.010::real0::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.0010.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.0010.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.010::real0::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'
The only difference is I am trying to implement it without systemd service that ubuntu offers. Kindly provide me a solution to overcome the above error. Thanks in advance
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing /etc/renderd.conf and the mapnik.xml layer named landcover-low-zoom, then rerun the documented renderd command as _renderd to reproduce the PostgreSQL syntax error. Compare the generated SQL around the POW expression and verify that the s2o map layer loads without an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, sql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100