NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi Team,

I am getting below sql error while stating render. Request you yo help me understand issue and fix for it.

Mapnik LOG> 2018-05-22 14:54:15: warning: unable to find face-name 'Unifont Upper Medium' in FontSet 'fontset-2'
renderd[64780]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR:  operator does not exist: hstore -> boolean
LINE 6: ...D (tags->'location' NOT IN ('underground') OR tags->'locatio...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
in executeQuery Full sql was: 'SELECT * FROM (SELECT
    way,
    COALESCE((
      'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)),
      ('railway_' || (CASE WHEN (railway IN ('platform')
                      AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
                      AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
                      AND (covered NOT IN ('yes') OR covered IS NULL))
                      THEN railway ELSE NULL END))
    ) AS feature
  FROM planet_osm_polygon
  WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform')
    OR (railway IN ('platform')
        AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
        AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
        AND (covered NOT IN ('yes') OR covered IS NULL))
  ORDER BY COALESCE(layer,0), way_area DESC
) AS highway_area_casing LIMIT 0'
  encountered during parsing of layer 'highway-area-casing' in Layer of '/root/src/openstreetmap-carto/mapnik.xml'
renderd[64780]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR:  operator does not exist: hstore -> boolean
LINE 6: ...D (tags->'location' NOT IN ('underground') OR tags->'locatio...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
in executeQuery Full sql was: 'SELECT * FROM (SELECT
    way,
    COALESCE((
      'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)),
      ('railway_' || (CASE WHEN (railway IN ('platform')
                      AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
                      AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
                      AND (covered NOT IN ('yes') OR covered IS NULL))
                      THEN railway ELSE NULL END))
    ) AS feature
  FROM planet_osm_polygon
  WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform')
    OR (railway IN ('platform')
        AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
        AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
        AND (covered NOT IN ('yes') OR covered IS NULL))
  ORDER BY COALESCE(layer,0), way_area DESC
) AS highway_area_casing LIMIT 0'
  encountered during parsing of layer 'highway-area-casing' in Layer of '/root/src/openstreetmap-carto/mapnik.xml'
renderd[64780]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR:  operator does not exist: hstore -> boolean
LINE 6: ...D (tags->'location' NOT IN ('underground') OR tags->'locatio...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
in executeQuery Full sql was: 'SELECT * FROM (SELECT
    way,
    COALESCE((
      'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)),
      ('railway_' || (CASE WHEN (railway IN ('platform')
                      AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
                      AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
                      AND (covered NOT IN ('yes') OR covered IS NULL))
                      THEN railway ELSE NULL END))
    ) AS feature
  FROM planet_osm_polygon
  WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform')
    OR (railway IN ('platform')
        AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
        AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
        AND (covered NOT IN ('yes') OR covered IS NULL))
  ORDER BY COALESCE(layer,0), way_area DESC
) AS highway_area_casing LIMIT 0'
  encountered during parsing of layer 'highway-area-casing' in Layer of '/root/src/openstreetmap-carto/mapnik.xml'
renderd[64780]: An error occurred while loading the map layer 'default': Postgis Plugin: ERROR:  operator does not exist: hstore -> boolean
LINE 6: ...D (tags->'location' NOT IN ('underground') OR tags->'locatio...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
in executeQuery Full sql was: 'SELECT * FROM (SELECT
    way,
    COALESCE((
      'highway_' || (CASE WHEN highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'cycleway', 'track', 'path', 'platform') THEN highway ELSE NULL END)),
      ('railway_' || (CASE WHEN (railway IN ('platform')
                      AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
                      AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
                      AND (covered NOT IN ('yes') OR covered IS NULL))
                      THEN railway ELSE NULL END))
    ) AS feature
  FROM planet_osm_polygon
  WHERE highway IN ('residential', 'unclassified', 'pedestrian', 'service', 'footway', 'track', 'path', 'platform')
    OR (railway IN ('platform')
        AND (tags->'location' NOT IN ('underground') OR tags->'location' IS NULL)
        AND (tunnel NOT IN ('yes', 'building_passage') OR tunnel IS NULL)
        AND (covered NOT IN ('yes') OR covered IS NULL))
  ORDER BY COALESCE(layer,0), way_area DESC
) AS highway_area_casing LIMIT 0'
  encountered during parsing of layer 'highway-area-casing' in Layer of '/root/src/openstreetmap-carto/mapnik.xml'

asked 22 May '18, 12:13

jiten19851985's gravatar image

jiten19851985
31223
accept rate: 0%

edited 23 May '18, 08:16

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

This snapshot may help

alt text

(23 May '18, 07:50) jiten19851985

alt text

(23 May '18, 09:36) jiten19851985

I wrote this code and I was testing it on Ubuntu 18.04 without problems. In the past we had some problems with database compatibility:

https://github.com/gravitystorm/openstreetmap-carto/pull/3078

I'm not familiar with databases, so please open the ticket here:

https://github.com/gravitystorm/openstreetmap-carto/issues

If you find the right solution, I will test it on my setup and merge the code as soon as possible.

permanent link

answered 24 May '18, 11:32

kocio's gravatar image

kocio
2.1k12341
accept rate: 20%

2

Hi,

upgraded postgres to 9.5 and all ok now. Thanks a lot your help on this.

Thanks

(24 May '18, 13:35) jiten19851985

I suspect that the style that you're using requires hstore and you haven't created it. See https://switch2osm.org/manually-building-a-tile-server-16-04-2-lts/ where it says "CREATE EXTENSION hstore;".

permanent link

answered 23 May '18, 08:18

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

hstore is there in the DB gis

gis=# gis=# gis=# \dx List of installed extensions Name | Version | Schema | Description ---------+---------+------------+--------------------------------------------------------------------- hstore | 1.1 | public | data type for storing sets of (key, value) pairs plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language postgis | 2.0.7 | public | PostGIS geometry, geography, and raster spatial types and functions (3 rows)

gis=#

(23 May '18, 09:35) jiten19851985

We'd probably need a bit more information about how you got to where you are? What was installed, and on what OS? Did you update from a previous version (perhaps you've got two versions of postgres/postgis, one with hstore, one without)?

(23 May '18, 09:39) SomeoneElse ♦

this is a fresh installation on RHEL 7.4 by following steps from below two links.

https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ https://www.keisan.io/knowledgebase/centos-7-open-street-map-tile-server

below is the version of postgres * postgis

[root@mapsrv ~]# rpm -qa | grep postg postgresql-devel-9.2.23-3.el7_4.x86_64 postgresql-9.2.23-3.el7_4.x86_64 postgis-utils-2.0.7-1.el7.x86_64 postgresql-server-9.2.23-3.el7_4.x86_64 postgis-docs-2.0.7-1.el7.x86_64 postgresql-contrib-9.2.23-3.el7_4.x86_64 postgis-debuginfo-2.0.7-1.el7.x86_64 postgresql-libs-9.2.23-3.el7_4.x86_64 postgis-2.0.7-1.el7.x86_64 [root@mapsrv ~]#

(23 May '18, 11:37) jiten19851985

You've got further than me on Centos then :)

(I couldn't get Mapnik to build cleanly there)

(23 May '18, 11:46) SomeoneElse ♦

I had a hard time installing mapnik but was able to install it finally. now I am stuck at this issue. :(

(23 May '18, 11:48) jiten19851985

Hi Team,

I am still facing the issue, any help on this much appreciated.

Thanks

(24 May '18, 09:17) jiten19851985

It's hardly surprising that no-one has looked at this again in the last 21 hours :)

As you have discovered, there isn't an "out of the box" solution on Redhat-based distributions. There are for Ubuntu (the last 2 long term support releases have good support). Other options might include Docker (though I'd personally think twice before running that in production; and you're not removing the Ubuntu dependancy there, just hiding it).

(24 May '18, 10:06) SomeoneElse ♦
1

This error is clearly a PostgreSQL one. Follow standard methods to resolve queries which generate errors on any DB package (i.e., take the actual query, run it in isolation vs the db, break it down to isolate the offending clause, review the DDL of tables/views used in the query, etc.) Also avoid posting large screeds of error messages here, they arent particularly readable).

(24 May '18, 11:29) SK53 ♦

Hi Guys,

Thanks for your help

(24 May '18, 13:36) jiten19851985
showing 5 of 9 show 4 more comments

Your pasted message is hardly legible. The problem might be helped by putting parentheses around any occurrence of tags->'something'.

permanent link

answered 22 May '18, 13:59

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×33

question asked: 22 May '18, 12:13

question was seen: 2,753 times

last updated: 24 May '18, 13:36

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum