I installed Kosmtik based on this tutorial. Everything works together with openstreetmap-carto. My goal is actually to use openstreetmap-carto-de. That's why I replaced openstreetmap-carto with this repo.
Expected behavior
I can use Kosmtik and see the de styles.
Actual behavior
I get an error.
Postgis Plugin: ERROR: column "localized_name_second" does not exist LINE 5: way, localized_name_second AS name, ^ in executeQuery Full sql was: 'SELECT * FROM (SELECT way, name, religion, way_pixels, is_building, surface, COALESCE(aeroway, amenity, wetland, power, landuse, leisure, man_made, "natural", shop, tourism, highway, railway) AS feature FROM (SELECT way, localized_name_second AS name, surface, ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway, ('amenity_' || (CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'taxi', 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police') OR amenity IN ('parking') AND (tags->'parking' NOT IN ('underground') OR (tags->'parking') IS NULL) THEN amenity ELSE NULL END)) AS amenity, ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture', 'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'plant_nursery', 'religious') THEN landuse ELSE NULL END)) AS landuse, ('shop_' || (CASE WHEN shop IN ('mall') AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL) THEN shop ELSE NULL END)) AS shop, ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'garden', 'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch', 'ice_rink', 'track', 'dog_park', 'fitness_station') THEN leisure ELSE NULL END)) AS leisure, ('man_made_' || (CASE WHEN man_made IN ('works', 'wastewater_plant', 'water_works') THEN man_made ELSE NULL END)) AS man_made, ('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" = 'mud' THEN "natural" ELSE tags->'wetland' END) ELSE NULL END)) AS wetland, ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power, ('tourism_' || (CASE WHEN tourism IN ('camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism, ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway, ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway, CASE WHEN religion IN ('christian', 'jewish', 'muslim') THEN religion ELSE 'INT-generic'::text END AS religion, way_area/NULLIF(POW(3.402823466385289e+38*0.001*0.28,2),0) AS way_pixels, CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building, way_area FROM planet_osm_polygon WHERE (landuse IS NOT NULL OR leisure IS NOT NULL OR aeroway IN ('apron', 'aerodrome') OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police') OR man_made IN ('works', 'wastewater_plant','water_works') OR "natural" IN ('beach', 'shoal', 'heath', 'mud', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') OR power IN ('station', 'sub_station', 'substation', 'generator') OR shop IN ('mall') OR tourism IN ('camp_site', 'caravan_site', 'picnic_site') OR highway IN ('services', 'rest_area') OR railway = 'station') AND way_area > 1*0.000000000000000::real*0.000000000000000::real ) AS landcover ORDER BY way_area DESC, feature ) AS features LIMIT 0' encountered during parsing of layer 'landcover' in Laye
My first attempt was to read the files mentioned here into my database. But I have no database called osm. My database is called gis and also fits in my opinion not to the SQL files.
postgres@astrid-TravelMate-5760G:~$ psql -d gis -f /home/astrid/src/openstreetmap-carto/contrib/use-upstream-database/view-line.sql
psql:/home/astrid/src/openstreetmap-carto/contrib/use-upstream-database/view-line.sql:1: NOTICE: view "planet_osm_line_de" does not exist, skipping
DROP VIEW
psql:/home/astrid/src/openstreetmap-carto/contrib/use-upstream-database/view-line.sql:56: ERROR: function osm_tag2num(text) does not exist
LINE 44: osm_tag2num(tags->'width') as "num_width",
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
psql:/home/astrid/src/openstreetmap-carto/contrib/use-upstream-database/view-line.sql:58: ERROR: relation "planet_osm_line_de" does not exist
What am I doing wrong?
The text was updated successfully, but these errors were encountered:
I installed Kosmtik based on this tutorial. Everything works together with openstreetmap-carto. My goal is actually to use openstreetmap-carto-de. That's why I replaced openstreetmap-carto with this repo.
Expected behavior
I can use Kosmtik and see the
destyles.Actual behavior
I get an error.
Postgis Plugin: ERROR: column "localized_name_second" does not exist LINE 5: way, localized_name_second AS name, ^ in executeQuery Full sql was: 'SELECT * FROM (SELECT way, name, religion, way_pixels, is_building, surface, COALESCE(aeroway, amenity, wetland, power, landuse, leisure, man_made, "natural", shop, tourism, highway, railway) AS feature FROM (SELECT way, localized_name_second AS name, surface, ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway, ('amenity_' || (CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'taxi', 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police') OR amenity IN ('parking') AND (tags->'parking' NOT IN ('underground') OR (tags->'parking') IS NULL) THEN amenity ELSE NULL END)) AS amenity, ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture', 'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'plant_nursery', 'religious') THEN landuse ELSE NULL END)) AS landuse, ('shop_' || (CASE WHEN shop IN ('mall') AND (tags->'location' NOT IN ('underground') OR (tags->'location') IS NULL) THEN shop ELSE NULL END)) AS shop, ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'garden', 'golf_course', 'miniature_golf', 'sports_centre', 'stadium', 'pitch', 'ice_rink', 'track', 'dog_park', 'fitness_station') THEN leisure ELSE NULL END)) AS leisure, ('man_made_' || (CASE WHEN man_made IN ('works', 'wastewater_plant', 'water_works') THEN man_made ELSE NULL END)) AS man_made, ('natural_' || (CASE WHEN "natural" IN ('beach', 'shoal', 'heath', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" = 'mud' THEN "natural" ELSE tags->'wetland' END) ELSE NULL END)) AS wetland, ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power, ('tourism_' || (CASE WHEN tourism IN ('camp_site', 'caravan_site', 'picnic_site') THEN tourism ELSE NULL END)) AS tourism, ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway, ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway, CASE WHEN religion IN ('christian', 'jewish', 'muslim') THEN religion ELSE 'INT-generic'::text END AS religion, way_area/NULLIF(POW(3.402823466385289e+38*0.001*0.28,2),0) AS way_pixels, CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building, way_area FROM planet_osm_polygon WHERE (landuse IS NOT NULL OR leisure IS NOT NULL OR aeroway IN ('apron', 'aerodrome') OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police') OR man_made IN ('works', 'wastewater_plant','water_works') OR "natural" IN ('beach', 'shoal', 'heath', 'mud', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') OR power IN ('station', 'sub_station', 'substation', 'generator') OR shop IN ('mall') OR tourism IN ('camp_site', 'caravan_site', 'picnic_site') OR highway IN ('services', 'rest_area') OR railway = 'station') AND way_area > 1*0.000000000000000::real*0.000000000000000::real ) AS landcover ORDER BY way_area DESC, feature ) AS features LIMIT 0' encountered during parsing of layer 'landcover' in LayeMy first attempt was to read the files mentioned here into my database. But I have no database called
osm. My database is calledgisand also fits in my opinion not to the SQL files.What am I doing wrong?
The text was updated successfully, but these errors were encountered: