[Tile-serving] [openstreetmap/mod_tile] Postgis Plugin: ERROR: column "name" does not exist (#192)
Luis Forte
notifications at github.com
Tue Jan 1 23:18:47 UTC 2019
Hi,
It look like a problem in the query:
To SELECT name in the first SELECT statement you must provide it from the sub SELECT and you don't select the column name in this sub select. In fact you have to select it also in the sub sub SELECT.
I can run the query with no error by correcting the sample in the log as shown above:
SELECT ST_AsBinary("way") AS geom,"feature","name","way_pixels"
FROM (SELECT way, way_pixels, name, COALESCE(wetland, landuse, "natural") AS feature
FROM (SELECT name, way, ('landuse_' || (CASE WHEN landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'vineyard', 'orchard') THEN landuse ELSE NULL END)) AS landuse, ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE tags->'wetland' END) ELSE NULL END)) AS wetland, way_area/NULLIF(305.748::real*305.748::real,0) AS way_pixels,way_area
FROM planet_osm_polygon WHERE (landuse IN ('forest', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow', 'vineyard', 'orchard') OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland', 'scrub')) AND way_area > 0.01*305.748::real*305.748::real ) AS features ORDER BY way_area DESC, feature) AS landcover_low_zoom WHERE "way" && ST_SetSRID('BOX3D(-1291480.029907033 6848757.734355468,-587036.3772304694 7553201.387032032)'::box3d, 3857)
I hope it helps,
Luis
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/mod_tile/issues/192#issuecomment-450764615
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20190101/8185b4bb/attachment.html>
More information about the Tile-serving
mailing list