Własny serwer kafelków

Kwestia gustu, choć zgadzam się są bardzo nasycone dlatego wcześniej napisałem

https://github.com/gravitystorm/openstreetmap-carto/issues/2194#issuecomment-265316515
no nie wiem las ciężko od trawy odróżnić :confused:

Co bym nie robił non stop dostaję albo błąd składni albo informację, że obiekt nie istnieje

renderd[621]: An error occurred while loading the map layer 'default': Postgis Plugin: BŁĄD:  błąd składni w lub blisko ","
LINE 2:     way,
               ^
in executeQuery Full sql was: 'SELECT * FROM (SELECTOD
    way,
    COALESCE('name_pl', 'name_en', 'name_es', 'name_fr', 'int_name', 'name') AS name,
    religion, way_pixels,

a próbowałem już chyba wszystkich możliwych kombinacji ‘name_pl’, ‘name:pl’, “name_pl”, “name:pl”, name_pl, name:pl

do pliku openstreetmap-carto.style dodałem

node,way   name         text         linear
node,way   name:en      text         linear
node,way   name:es      text         linear
node,way   name:fr      text         linear
node,way   name:pl      text         linear
node,way   int_name     text         linear

Coś jeszcze potrzeba??

Po zmianie w openstreetmap-carto.style musisz wykonać import ponownie.
A czasem nie ma tych tagów już teraz w kolumnie hstore? Tam powinny wylądować wszystkie pozostałe tagi dla obiektów które załapały się poprzez zwykłe kolumny, a tagi te nie są jednocześnie na czarnej liście (source, created_by i inne metadane)
Spróbuj zrobić select(*) na czymś co wiesz że posiada name:pl i popatrz na wynik kwerendy.

To akurat robię, a moja komenda to

time osm2pgsql --create --slim \
        --cache 500 --number-processes 4 --hstore -m \
        --style /opt/osm/local_style/openstreetmap-carto.style --multi-geometry \
        -U psql -c -d gis \
        --bbox 21,48.9,24,50.9 \
        /mnt/4tb/nagrania/osm/podkarpackie-latest.osm.pbf

Też czytałem, że tak to powinno działać, ale jeśli są to jak rozumiem zapytanie o ‘name:pl’ powinno je stamtąd wydobyć?

No nie. Skąd się to tam znalazło wtym jednym polu to ja nie zgadnę. Błędy wcale nie dotyczyły pól name a SELECTOD. Skąd się tam wzięło to extra OD to nigdy nie zgadnę.

  - id: landcover
    name: landcover
    geometry: polygon
    <<: *extents
    Datasource:
      <<: *osm2pgsql
      table: |-
        (SELECTOD
            way,
            COALESCE('name_pl', 'name_en', 'name_es', 'name_fr', 'int_name', 'name') AS name,
            religion, way_pixels,
            COALESCE(aeroway, amenity, wetland, power, landuse, leisure, military, "natural", tourism, highway, railway) AS feature
          FROM (SELECT
              way, COALESCE('name_pl', 'name_en', 'name_es', 'name_fr', 'int_name', 'name') AS name,
              ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,
  

Po usunięciu OD ruszyło z ‘name:pl’, ‘name:en’, …

hstore to key/value store, a nie zwykła kolumna, trzeba się odnieść strzałką:
https://www.postgresql.org/docs/9.5/static/hstore.html

no fakt. Samo wskazanie ‘name_pl’ spowodowało jedynie tyle, że nazwy obiektów zostały zastąpione i wszystkie obecnie nazywają się name:pl :smiley:

Przydał by się przykład z życia wzięty, gdyż jak bym nie próbowałem skorzystać z tej formy już na kilka sposobów jak ten
COALESCE(“name:pl”=>name_pl, “name:en”=>name_en, name) AS name,

i nic to nie daje gdyż cały nawet po odświeżeniu kafli nazwa, która w bazie po polsku jest zapisana w name:pl nadal wyświetla się jedynie jako standardowy wpis z pola name np http://bigvo.hopto.org/osm/?zoom=15&lat=49.82472&lon=22.98724&layers=B0

Znalazłem przy okazji dość aktualne instrukcje pod Ubuntu 16.04:

https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04

Cześć, jakiś czas temu też zajmowałem się tym tematem. Zabawę z titlami chyba najprzyjemniej zacząć z TileMillem i https://github.com/mapbox/osm-bright.
U mnie to wygląda mniej więcej tak:
Na Windows mam:

  • TileMilla
  • styl osm-bright
  • python

Na wirtualce ubuntu 14.04 LTS:

  1. Ogólnie zaczynamy od postawienia linuxa i wgrania do nich map
  2. Instalujemy TM
  3. Konfigurujemy plik configuration w stylu osm-bright
    3.1 Pobieramy potrzebne pliki .shp i je dodajemy do odpowiednich katalogów.
  4. Instalujemy z poziomu pythona nasz styl do TM
  5. Odpalamy TM i nasz styl i możemy się bawić:)

Jak chcemy postawić serwer titli to najlepiej wyeksportować je do formatu .mbtiles i odpalić jakiś serwer do tego formatu.
Ogólnie dla europy powinniśmy mieć jakieś 300gb wolnego miejsca najlepiej więcej. I dosyć dobry sprzęt bo inaczej będzie to długo trwało.

Pierwszy tak dogłębny opis jaki widziałem. Wyjaśnił również, że kafelki to przygotowywane są zawczasu za pomocą render_list. Dotychczas na podstawie wcześniej podanych tu informacji zachodziłem w głowę jak to tego zmusić renderd. Jak widać to nie on renderd a inna aplikacja z tego samego pakietu mod_tile do tego służy

Ciekawa koncepcja. Jak by kolega mógł udzielić na ten temat nieco więcej szczegółów mogło by to być bardzo pomocne

Jeśli chodzi o format .mbtiles to jest to ogólnie sql-lite przystosowany do przechowywania titli. Ja wykorzystywałem jako serwer chyba ten projekt w javie: https://github.com/jtreml/mbtiles4j ale można znaleźć wersję pod inne języki np. php, node.js, python.

W moim przypadku musiałem pobrać projekt serwera w javie i zaimportować go w eclipse. Ustawić plik konfiguracyjny gdzie podałem path do pliku z titlami i odpalić aplikacje. Możesz także zbudować sobie z tego jar`a i umieścić na swoim serwerze wraz z plikiem z titlami.

W razie potrzeby mogę przygotować jar`a i instrukcje.

Osobiście pewnie nie skorzystam, przynajmniej nie na tym etapie, ale dla kompletności wątku domniemam, że nie będę jedyny który sądzi by taki opis się przydał.

Natomiast tak się zastanawiam nad problemem dodania kodu dla wież. Otóż kod ten http://bigvo.hopto.org/osm-extra/carto-patches/013-towers_v3.patch aplikowany do carto ładnie startuje po czym kafelki nie renderują się dla poziomów na których powinny być widoczne wieże a log pokazuje m.in. następujący komunikat

renderd[24413]:    reason: Postgis Plugin: BŁĄD:  kolumna "tower_construction" nie istnieje

Ponieważ równie dobrze mogło by się wywalić na “tower:type” zacząłem się zastanawiać i szukać głębiej. Otóż okazuje się, że dla województwa Podkarpackiego dla którego postawiłem bazę testową nie ma w ogóle ani jednego obiektu co by był oznaczony w ten sposób. Możliwe jest by to było przyczyną problemów?

Nie wątpię, że darzysz swoje województwo Wielkim Szacunkiem, ale poprawniej będzie pisać małymi literami.

Fakt błąd, nie wątpię jednak że nadejdzie dzień jak powiesz coś odnoszącego się kwestii merytorycznej poruszanego tematu.

Błąd ten mówi o tym że w twojej bazie danych Postgis nie istnieje kolumna tower_construction, jeśli baza danych jest tworzona automatycznie z twojego pliku stylu to musisz ją przeładować za każdym razem kiedy w stylu dodasz nowy tag inaczej nie będzie on uwzględniony w niej, ponieważ dla każdego stylu brane są tylko wymagane kolumny podczas jego parsowania.

Brałem pod uwagę, że problem wynika z tego, że kolumna jest pusta nawet po przeładowaniu, gdyż tower:construction po prostu nie ma dodanego do żadnego obiektu na Podkarpaciu i import po prostu nie tworzył tabeli dla obiektu którego nie ma. Spróbowałem dla obszaru kraju gdzie wiem z overpassa, że stosownie obiekty w bazie istnieją i sytuacja z błędem powtórzyła się. Uprościłem zapytanie SQL w project.mml

diff -Naur local_style.old/amenity-points.mss local_style/amenity-points.mss
--- local_style.old/amenity-points.mss	2017-01-26 22:01:48.662267351 +0100
+++ local_style/amenity-points.mss	2017-02-07 17:06:03.133831341 +0100
@@ -315,11 +315,32 @@
     marker-clip: false;
   }
 
-  [feature = 'man_made_mast'][zoom >= 17] {
-    marker-file: url('symbols/communications.svg');
+ [feature = 'man_made_mast'][zoom >= 15] {
+    marker-file: url('symbols/mast.svg');
     marker-fill: @man-made-icon;
     marker-placement: interior;
     marker-clip: false;
+    ["tower:type" = 'communication'] {
+      marker-file: url('symbols/mast_communications.svg');
+    }
+  }
+
+  [feature = 'man_made_tower'][zoom >= 15] {
+    marker-fill: @man-made-icon;
+    marker-placement: interior;
+    marker-clip: false;
+    ["tower:construction" = 'freestanding'] {
+      marker-file: url('symbols/tower_cantilever.svg');
+      ["tower:type" = 'communication'] {
+        marker-file: url('symbols/tower_cantilever_communication.svg');
+      }
+    }
+    ["tower:construction" = 'lattice'] {
+      marker-file: url('symbols/tower_lattice.svg');
+      ["tower:type" = 'communication'] {
+        marker-file: url('symbols/tower_lattice_communication.svg');
+      }
+    }
   }
 
   [feature = 'tourism_museum'][zoom >= 16] {
@@ -1348,6 +1369,7 @@
   [feature = 'historic_wayside_cross'][zoom >= 17],
   [feature = 'natural_cave_entrance'][zoom >= 15],
   [feature = 'man_made_mast'][zoom >= 17],
+  [feature = 'man_made_tower'][zoom >= 15],
   [feature = 'man_made_water_tower'][zoom >= 17] {
     text-name: "[name]";
     text-size: @standard-text-size;
@@ -1361,6 +1383,7 @@
       text-dy: 6;
     }
     [feature = 'man_made_mast'] { text-dy: 10; }
+    [feature = 'man_made_tower'] { text-dy: 10; }
     text-face-name: @standard-font;
     text-halo-radius: @standard-halo-radius;
     text-halo-fill: @standard-halo-fill;
diff -Naur local_style.old/openstreetmap-carto.style local_style/openstreetmap-carto.style
--- local_style.old/openstreetmap-carto.style	2017-01-26 22:01:34.381365985 +0100
+++ local_style/openstreetmap-carto.style	2017-01-28 19:05:33.875815299 +0100
@@ -65,6 +65,7 @@
 node,way   surface      text         linear
 node,way   toll         text         linear
 node,way   tourism      text         polygon
+node,way   tower:construction text   linear
 node,way   tower:type   text         linear
 way        tracktype    text         linear
 node,way   tunnel       text         linear
diff -Naur local_style.old/project.mml local_style/project.mml
--- local_style.old/project.mml	2017-01-26 22:01:48.662814989 +0100
+++ local_style/project.mml	2017-02-07 17:04:55.899017152 +0100
@@ -1632,7 +1632,7 @@
                                             'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea', 'coffee') THEN shop 
                               WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END,
               'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table') THEN leisure ELSE NULL END,
-              'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
+              'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
               'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END,
               'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,
               'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END,
@@ -1643,6 +1643,8 @@
             religion,
             denomination,
             "generator:source",
+            "tower:construction",
+            "tower:type",
             power_source,
             way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
           FROM planet_osm_polygon
@@ -1660,7 +1662,7 @@
                            'social_facility', 'charging_station')
             OR shop IS NOT NULL -- skip checking a huge list and use a null check
             OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table')
-            OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk')
+            OR man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk')
             OR "natural" IN ('spring')
             OR historic IN ('memorial', 'monument', 'archaeological_site')
             OR highway IN ('bus_stop', 'elevator', 'traffic_signals')
@@ -1702,7 +1704,7 @@
                               WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END,
               'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
                                                   'dog_park') THEN leisure ELSE NULL END,
-              'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
+              'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
               'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END,
               'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN historic ELSE NULL END,
               'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END,
@@ -1723,6 +1725,8 @@
             religion,
             denomination,
             "generator:source",
+            "tower:construction",
+            "tower:type",
             power_source,
             NULL AS way_pixels
           FROM planet_osm_point
@@ -1741,7 +1745,7 @@
             OR shop IS NOT NULL -- skip checking a huge list and use a null check
             OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
                            'dog_park')
-            OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk')
+            OR man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk')
             OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')
             OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross')
             OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford')
@@ -2089,7 +2093,7 @@
                                                   'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 
                                                   'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 
                                                   'construction', 'military', 'plant_nursery', 'religious') THEN landuse ELSE NULL END,
-              'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END,
+              'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END,
               'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 
                                                     'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END,
               'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,
@@ -2115,7 +2119,7 @@
               OR shop IS NOT NULL
               OR leisure IS NOT NULL
               OR landuse IS NOT NULL
-              OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk')
+              OR man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk')
               OR "natural" IS NOT NULL
               OR place IN ('island', 'islet')
               OR military IN ('danger_area')
@@ -2216,7 +2220,7 @@
                                                       'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 
                                                       'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 
                                                       'construction', 'military', 'plant_nursery', 'religious') THEN landuse ELSE NULL END,
-                  'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk') THEN man_made ELSE NULL END,
+                  'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'obelisk') THEN man_made ELSE NULL END,
                   'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 
                                                         'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree') 
                                                         THEN "natural" ELSE NULL END,
@@ -2256,7 +2260,7 @@
                   OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 
                                  'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'greenhouse_horticulture', 
                                  'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military', 'plant_nursery', 'religious')
-                  OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk')
+                  OR man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'cross', 'obelisk')
                   OR "natural" IS NOT NULL
                   OR place IN ('island', 'islet')
                   OR military IN ('danger_area')
diff -Naur local_style.old/symbols/mast_communications.svg local_style/symbols/mast_communications.svg
--- local_style.old/symbols/mast_communications.svg	1970-01-01 01:00:00.000000000 +0100
+++ local_style/symbols/mast_communications.svg	2017-01-28 19:05:33.876419067 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   id="svg4138"
+   viewBox="0 0 14 14"
+   height="14"
+   width="14"
+   version="1.1">
+  <metadata
+     id="metadata4146">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4144" />
+  <rect
+     style="fill:none;stroke:none;visibility:hidden"
+     id="canvas"
+     y="0"
+     x="0"
+     height="14"
+     width="14" />
+  <path
+     id="mast-communication"
+     d="M 4 0.40625 C 2.23276 1.1855669 0.96875 2.9521023 0.96875 5 C 0.96875 7.047898 2.23276 8.814433 4 9.59375 L 4 8.4375 C 2.80447 7.746709 2 6.4881502 2 5 C 2 3.5118498 2.80447 2.2532914 4 1.5625 L 4 0.40625 z M 10 0.40625 L 10 1.5625 C 11.19553 2.2532914 12 3.5118498 12 5 C 12 6.4881502 11.19553 7.746709 10 8.4375 L 10 9.59375 C 11.76724 8.814433 13.03125 7.047898 13.03125 5 C 13.03125 2.9521023 11.76724 1.1855669 10 0.40625 z M 5 2.1875 C 3.842954 2.6043642 3 3.7033306 3 5 C 3 6.2966694 3.842954 7.395636 5 7.8125 L 5 6.71875 C 4.403081 6.3740292 4 5.7435697 4 5 C 4 4.2564303 4.403081 3.6259708 5 3.28125 L 5 2.1875 z M 9 2.1875 L 9 3.28125 C 9.596919 3.6259708 10 4.2564303 10 5 C 10 5.7435697 9.596919 6.3740292 9 6.71875 L 9 7.8125 C 10.157046 7.395636 11 6.2966694 11 5 C 11 3.7033306 10.157046 2.6043642 9 2.1875 z M 7 4 C 6.4022075 4 6 4.4692172 6 5 L 6 9 L 3.1132812 14 L 4.2675781 14 L 6 11 L 6 14 L 8 14 L 8 11 L 9.7324219 14 L 10.886719 14 L 8 9 L 8 5 C 8 4.5039063 7.5977925 4 7 4 z " />
+</svg>
diff -Naur local_style.old/symbols/mast.svg local_style/symbols/mast.svg
--- local_style.old/symbols/mast.svg	1970-01-01 01:00:00.000000000 +0100
+++ local_style/symbols/mast.svg	2017-01-28 19:05:33.876545730 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="14"
+   height="14"
+   viewBox="0 0 14 14"
+   id="svg4138">
+  <metadata
+     id="metadata4146">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4144" />
+  <rect
+     width="14"
+     height="14"
+     x="0"
+     y="0"
+     id="canvas"
+     style="fill:none;stroke:none;visibility:hidden" />
+  <path
+     d="M 7,1 C 6.4022075,1 6,1.4692172 6,2 L 6,9 3.1132812,14 4.2675781,14 6,11 6,14 8,14 8,11 9.7324219,14 10.886719,14 8,9 8,2 C 8,1.5039063 7.5977925,1 7,1 Z"
+     id="mast" />
+</svg>
diff -Naur local_style.old/symbols/tower_cantilever_communication.svg local_style/symbols/tower_cantilever_communication.svg
--- local_style.old/symbols/tower_cantilever_communication.svg	1970-01-01 01:00:00.000000000 +0100
+++ local_style/symbols/tower_cantilever_communication.svg	2017-01-28 19:05:33.876640268 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   id="svg4138"
+   viewBox="0 0 14 14"
+   height="14"
+   width="14"
+   version="1.1">
+  <metadata
+     id="metadata4146">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4144" />
+  <rect
+     style="fill:none;stroke:none;visibility:hidden"
+     id="canvas"
+     y="0"
+     x="0"
+     height="14"
+     width="14" />
+  <path
+     id="tower-freestanding-communication"
+     d="M 4 0.40625 C 2.23276 1.1855669 0.96875 2.9521023 0.96875 5 C 0.96875 7.047898 2.23276 8.814433 4 9.59375 L 4 8.4375 C 2.80447 7.746709 2 6.4881502 2 5 C 2 3.5118498 2.80447 2.2532914 4 1.5625 L 4 0.40625 z M 10 0.40625 L 10 1.5625 C 11.19553 2.2532914 12 3.5118498 12 5 C 12 6.4881502 11.19553 7.746709 10 8.4375 L 10 9.59375 C 11.76724 8.814433 13.03125 7.047898 13.03125 5 C 13.03125 2.9521023 11.76724 1.1855669 10 0.40625 z M 5 2.1875 C 3.842954 2.6043642 3 3.7033306 3 5 C 3 6.2966694 3.842954 7.395636 5 7.8125 L 5 6.71875 C 4.403081 6.3740292 4 5.7435697 4 5 C 4 4.2564303 4.403081 3.6259708 5 3.28125 L 5 2.1875 z M 9 2.1875 L 9 3.28125 C 9.596919 3.6259708 10 4.2564303 10 5 C 10 5.7435697 9.596919 6.3740292 9 6.71875 L 9 7.8125 C 10.157046 7.395636 11 6.2966694 11 5 C 11 3.7033306 10.157046 2.6043642 9 2.1875 z M 7 4 C 6.4022075 4 6 4.469217 6 5 L 6 11 L 5 11 L 5 12 L 3 12 L 3 14 L 11 14 L 11 12 L 9 12 L 9 11 L 8 11 L 8 5 C 8 4.503906 7.597793 4 7 4 z " />
+</svg>
diff -Naur local_style.old/symbols/tower_cantilever.svg local_style/symbols/tower_cantilever.svg
--- local_style.old/symbols/tower_cantilever.svg	1970-01-01 01:00:00.000000000 +0100
+++ local_style/symbols/tower_cantilever.svg	2017-01-28 19:05:33.876724041 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="14"
+   height="14"
+   viewBox="0 0 14 14"
+   id="svg4138">
+  <metadata
+     id="metadata4146">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4144" />
+  <rect
+     width="14"
+     height="14"
+     x="0"
+     y="0"
+     id="canvas"
+     style="fill:none;stroke:none;visibility:hidden" />
+  <path
+     d="m 6,2 0,9 -1,0 0,1 -2,0 0,2 8,0 0,-2 -2,0 0,-1 -1,0 0,-9 C 8,1.5039063 7.5977925,1 7,1 6.4022075,1 6,1.4692172 6,2 Z"
+     id="tower-freestanding" />
+</svg>
diff -Naur local_style.old/symbols/tower_lattice_communication.svg local_style/symbols/tower_lattice_communication.svg
--- local_style.old/symbols/tower_lattice_communication.svg	1970-01-01 01:00:00.000000000 +0100
+++ local_style/symbols/tower_lattice_communication.svg	2017-01-28 19:05:33.876813654 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="14"
+   height="14"
+   viewBox="0 0 14 14"
+   id="svg4138">
+  <metadata
+     id="metadata4146">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4144" />
+  <rect
+     width="14"
+     height="14"
+     x="0"
+     y="0"
+     id="canvas"
+     style="fill:none;stroke:none;visibility:hidden" />
+  <path
+     id="tower-lattice-communication"
+     d="M 4 0.40625 C 2.23276 1.1855669 0.96875 2.9521023 0.96875 5 C 0.96875 7.047898 2.23276 8.814433 4 9.59375 L 4 8.4375 C 2.80447 7.746709 2 6.4881502 2 5 C 2 3.5118498 2.80447 2.2532914 4 1.5625 L 4 0.40625 z M 10 0.40625 L 10 1.5625 C 11.19553 2.2532914 12 3.5118498 12 5 C 12 6.4881502 11.19553 7.746709 10 8.4375 L 10 9.59375 C 11.76724 8.814433 13.03125 7.047898 13.03125 5 C 13.03125 2.9521023 11.76724 1.1855669 10 0.40625 z M 5 2.1875 C 3.842954 2.6043642 3 3.7033306 3 5 C 3 6.2966694 3.842954 7.395636 5 7.8125 L 5 6.71875 C 4.403081 6.3740292 4 5.7435697 4 5 C 4 4.2564303 4.403081 3.6259708 5 3.28125 L 5 2.1875 z M 9 2.1875 L 9 3.28125 C 9.596919 3.6259708 10 4.2564303 10 5 C 10 5.7435697 9.596919 6.3740292 9 6.71875 L 9 7.8125 C 10.157046 7.395636 11 6.2966694 11 5 C 11 3.7033306 10.157046 2.6043642 9 2.1875 z M 7 3 L 5.2011719 10 L 2.5996094 14 L 4 14 L 4.6660156 13 L 9.3339844 13 L 10 14 L 11.400391 14 L 8.8007812 10 L 7 3 z M 7 7 L 7.75 10 L 6.25 10 L 7 7 z M 6 11 L 8 11 L 8.6660156 12 L 5.3339844 12 L 6 11 z " />
+</svg>
diff -Naur local_style.old/symbols/tower_lattice.svg local_style/symbols/tower_lattice.svg
--- local_style.old/symbols/tower_lattice.svg	1970-01-01 01:00:00.000000000 +0100
+++ local_style/symbols/tower_lattice.svg	2017-01-28 19:05:33.876919027 +0100
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.1"
+   width="14"
+   height="14"
+   viewBox="0 0 14 14"
+   id="svg4138">
+  <metadata
+     id="metadata4146">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs4144" />
+  <rect
+     width="14"
+     height="14"
+     x="0"
+     y="0"
+     id="canvas"
+     style="fill:none;stroke:none;visibility:hidden" />
+  <path
+     id="tower-lattice"
+     d="M 7 3 L 5.2011719 10 L 2.5996094 14 L 4 14 L 4.6660156 13 L 9.3339844 13 L 10 14 L 11.400391 14 L 8.8007812 10 L 7 3 z M 7 7 L 7.75 10 L 6.25 10 L 7 7 z M 6 11 L 8 11 L 8.6660156 12 L 5.3339844 12 L 6 11 z "/>
+</svg>

i poszło choć tak nie do końca efekt jest pożądany. Z jakiegoś dziwnego powodu zamiast otrzymać rysunki wież to mam duże czarne kropki :slight_smile: jak tu http://bigvo.hopto.org/osm/?zoom=15&lat=49.94685&lon=21.87945&layers=B0. Ktoś może ma pomysł z czego to wynika?

**Edit **:
Problem rozwiązany. Polegał na źle przygotowanym kodzie w amenity-points.mss

Edit 2:
Dla zainteresowanych to problem z ze zmianą języka z pola name nie polegał na nieistnieniu kolumn w bazie lecz jak to w tego typu przypadkach bywa na odpowiednio przygotowanym kodzie. Okazuje się, że cały czas wykonywałem to prawidłowo. Otóż kod poniższy jest poprawny

COALESCE("name:pl", "name:en", "name:es", "name:fr", int_name, short_name, name) AS name,

Problem tam naprawdę wynikał jedynie ze złożoności kodu dla obiektów landcover-low-zoom oraz landcover gdzie dla pierwszego wystąpienia name nie należało dokonywać zmiany. Poniższy przykład działa poprawnie

  - id: landcover-low-zoom
    name: landcover-low-zoom
    geometry: polygon
    <<: *extents
    Datasource:
      <<: *osm2pgsql
      table: |-
        (SELECT
            way,
            name,
            way_pixels,
            COALESCE(wetland, landuse, "natural") AS feature
          FROM (SELECT
              way, COALESCE("name:pl", "name:en", "name:es", "name:fr", int_name, short_name, name, '') AS name,
              ('landuse_' || (CASE WHEN landuse IN ('forest', 'military') THEN landuse ELSE NULL END)) AS landuse,
              ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END)) AS "natural",
              ('wetland_' || (CASE WHEN "natural" IN ('wetland', 'mud') THEN (CASE WHEN "natural" IN ('mud') THEN "natural" ELSE wetland END) ELSE NULL END)) AS wetland,
              way_area/NULLIF(!pixel_width!::real*!pixel_height!::real,0) AS way_pixels
            FROM planet_osm_polygon
            WHERE (landuse IN ('forest', 'military')
              OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock'))
              AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
              AND building IS NULL
            ORDER BY CASE WHEN layer~E'^-?\\d+$' AND length(layer)<10 THEN layer::integer ELSE 0 END, way_area DESC
          ) AS features
        ) AS landcover_low_zoom
    properties:
      minzoom: 7
      maxzoom: 9
 

Dokładnie taki plik configuration.txt zapisałem. Dodatkowo rórwnież należało stworzyć plik state.txt, który wygląda następująco

#original-source: http://planet.openstreetmap.org/replication/day/000/001/612.state.txt
#generated-by: https://osm.mazdermind.de/replicate-sequences/?Y=2017&m=02&d=10&H=15&i=22&s=08&stream=day
#Fri Feb 10 00:06:19 UTC 2017
sequenceNumber=1612
timestamp=2017-02-10T00\:00\:00Z

Pytanie natomiast czy mój plik update.sh wygląda prawidłowo

time osmosis --read-replication-interval workingDirectory=/opt/osm/update \
  --simplify-change --write-xml-change - | \
osm2pgsql --append -d gis -U psql --cache 7200 --number-processes 4 --slim \
  --flat-nodes --bbox 19.2,48.9,24,50.9 europe_nodes.bin -

gdyż dla tej komendy otrzymuje błąd przy uruchomieniu

/opt/osm/osm-scripts/update.sh
osm2pgsql version 0.93.0-dev (64 bit id space)

Using built-in tag processing pipeline
Using projection SRS 3857 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=7200MB, maxblocks=115200*65536, allocation method=11
Mid: loading persistent node cache from --bbox
Mid: pgsql, cache=7200
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: 19.2,48.9,24,50.9
node cache: stored: 0(-nan%), storage efficiency: -nan% (dense blocks: 0, sparse nodes: 0), hit rate: -nan%
Osm2pgsql failed due to ERROR: Cannot detect file format. Try using -r.
lut 10, 2017 3:26:39 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.45
lut 10, 2017 3:26:39 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
lut 10, 2017 3:26:39 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
lut 10, 2017 3:26:39 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
lut 10, 2017 3:26:40 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-replication-interval failed
java.lang.NumberFormatException: null
        at java.lang.Integer.parseInt(Integer.java:542)
        at java.lang.Integer.parseInt(Integer.java:615)
        at org.openstreetmap.osmosis.replication.v0_6.impl.ReplicationDownloaderConfiguration.getMaxInterval(ReplicationDownloaderConfiguration.java:66)
        at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.calculateMaximumTimestamp(BaseReplicationDownloader.java:197)
        at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.download(BaseReplicationDownloader.java:222)
        at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.runImpl(BaseReplicationDownloader.java:304)
        at org.openstreetmap.osmosis.replication.v0_6.BaseReplicationDownloader.run(BaseReplicationDownloader.java:383)
        at java.lang.Thread.run(Thread.java:745)

lut 10, 2017 3:26:40 PM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
        at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)
        at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)
        at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)

Dla testów staram się ograniczyć obszar dla jedynie dwóch województw stąd dopisana zmienna bbox

Chciałem sprawdzić na ile aktualna jest moja skrócona instrukcja instalacji serwera dla Gentoo http://bigvo.hopto.org/osm-extra/INSTALL.md i przeinstalowałem na nowo bazę po czym wywaliło mnie błędem którego dotychczas nie widziałem.

serw-zfs conf.d # /etc/init.d/postgresql-9.6 start
 * /run/postgresql: creating directory
 * /run/postgresql: correcting owner
 * Starting PostgreSQL 9.6 ...
DZIENNIK:  pominięto brakujący plik konfiguracyjny "/mnt/4tb/nagrania/osm/postgres/postgresql.auto.conf"                                                                                                     [ ok ]
serw-zfs conf.d # su - postgres
postgres@serw-zfs ~ $ createuser96 psql
postgres@serw-zfs ~ $ createdb96 -E UTF8 -O psql gis
postgres@serw-zfs ~ $ psql96 -d gis -c "CREATE EXTENSION hstore;"
CREATE EXTENSION
postgres@serw-zfs ~ $ psql96 -d gis -c "CREATE EXTENSION postgis;"
BŁĄD:  kolumna "srtExt" relacji "spatial_ref_sys" nie istnieje

Wiele w systemie od tego czasu nie zmieniłem co by miało znaczenie poza wersją postgresql. Wiecie z czego to może wynikać? Nie bardzo cokolwiek znajduję.

 Wed Apr 19 23:32:23 2017 >>> dev-db/postgresql-9.6.2-r1
   merge time: 2 minutes and 23 seconds.

 Thu Jun  1 13:57:17 2017 >>> dev-db/postgresql-9.6.3-r1
   merge time: 2 minutes and 20 seconds.

A zainstalowałeś pakiet PostGIS? A może chodzi o uprawnienia? Zobacz tu:

https://gis.stackexchange.com/a/41704

Okazało się, że przy okazji reinstalacji postgresql w Gentoo trochę zmieniono tryb instalacji tak by można mieć kilka wersji postgresql jednocześnie, ale instalacja nie ustawiła ponownie prawidłowo aktualnie wykorzystywanej wersji. Po poprawieniu tego błędu komenda przeszła bez problemu.
Można by rzec dzień jak co dzień z tym systemem :wink:

podziwiam cię. Raz zainstalowałem bez GUI. Zajęło mi to kilka dni. Czysty masochism.

no nie jest łatwo, gdyż trzeba w miarę na bieżąco śledzić co znowu wymyślili, ale system skryptów portage jak się opanuje to dość prosto można dopisać kolejne skrypty dla softu którego standardowo nie ma w dystrybucji. Mam już ich tyle, że nie wiem jak bym miał się przesiąść na coś innego by je ponownie musieć sobie przygotowywać. Niemniej faktycznie wygląda to trochę tak, że dzielnie walczy się z problemami nieznanymi w innych systemach :wink:

Natomiast co może być przyczyną, błędu

Osm2pgsql failed due to ERROR: failed to uncompress data: data error

Jak tworzę bazę dla Podkarpacia to wszystko jest ok. Przygotowanie bazy dla Europy przerywa mnie tym samym błędem i to dla dla kilku wersji pliku dla kontynentu nie tylko najnowszego ale i sprzed kilku dni.

Podkarpackie

osm2pgsql version 0.92.1 (64 bit id space)

Using built-in tag processing pipeline
Using projection SRS 3857 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=16000MB, maxblocks=256000*65536, allocation method=11
Mid: loading persistent node cache from /mnt/3tb/flatnodes
Allocated space for persistent node cache file
Maximum node in persistent node cache: 0
Mid: pgsql, scale=100 cache=16000
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: /mnt/3tb/podkarpackie-latest.osm.pbf
Using PBF parser.
Processing: Node(9921k 20.8k/s) Way(1236k 137.44k/s) Relation(8080 621.54/s)  parse time: 500s
Node stats: total(9921902), max(4942954186) in 476s
Way stats: total(1236985), max(504086971) in 9s
Relation stats: total(8083), max(7363460) in 13s
Maximum node in persistent node cache: 4942987263
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Mid: loading persistent node cache from /mnt/3tb/flatnodes
Maximum node in persistent node cache: 4942987263
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Using built-in tag processing pipeline
Mid: loading persistent node cache from /mnt/3tb/flatnodes
Maximum node in persistent node cache: 4942987263
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Using built-in tag processing pipeline
Mid: loading persistent node cache from /mnt/3tb/flatnodes
Maximum node in persistent node cache: 4942987263
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Using built-in tag processing pipeline
Mid: loading persistent node cache from /mnt/3tb/flatnodes
Maximum node in persistent node cache: 4942987263
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels
Using built-in tag processing pipeline

Going over pending ways...
        1035921 ways are pending

Using 4 helper-processes
Finished processing 1035921 ways in 48 s

1035921 Pending ways took 48s at a rate of 21581.69/s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads

Going over pending relations...
        0 relations are pending

Using 4 helper-processes
Finished processing 0 relations in 0 s

Committing transaction for planet_osm_point
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_line
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_polygon
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_roads
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_point
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_line
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_polygon
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_roads
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_point
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_line
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_polygon
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_roads
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_point
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_line
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_polygon
OSTRZEŻENIE:  brak aktywnej transakcji
Committing transaction for planet_osm_roads
OSTRZEŻENIE:  brak aktywnej transakcji
Stopping table: planet_osm_nodes
Sorting data and creating indexes for planet_osm_roads
Sorting data and creating indexes for planet_osm_line
Stopping table: planet_osm_ways
Building index on table: planet_osm_ways
Stopping table: planet_osm_rels
Building index on table: planet_osm_rels
Sorting data and creating indexes for planet_osm_polygon
Sorting data and creating indexes for planet_osm_point
Stopped table: planet_osm_nodes in 0s
Stopped table: planet_osm_rels in 0s
Copying planet_osm_roads to cluster by geometry finished
Creating geometry index on planet_osm_roads
Creating osm_id index on planet_osm_roads
Creating indexes on planet_osm_roads finished
All indexes on planet_osm_roads created in 1s
Completed planet_osm_roads
Copying planet_osm_point to cluster by geometry finished
Creating geometry index on planet_osm_point
Copying planet_osm_line to cluster by geometry finished
Creating geometry index on planet_osm_line
Creating osm_id index on planet_osm_point
Creating indexes on planet_osm_point finished
All indexes on planet_osm_point created in 4s
Completed planet_osm_point
Creating osm_id index on planet_osm_line
Creating indexes on planet_osm_line finished
All indexes on planet_osm_line created in 5s
Completed planet_osm_line
Copying planet_osm_polygon to cluster by geometry finished
Creating geometry index on planet_osm_polygon
Creating osm_id index on planet_osm_polygon
Creating indexes on planet_osm_polygon finished
All indexes on planet_osm_polygon created in 19s
Completed planet_osm_polygon
Stopped table: planet_osm_ways in 22s
Maximum node in persistent node cache: 4942987263
Maximum node in persistent node cache: 4942987263
Maximum node in persistent node cache: 4942987263
Maximum node in persistent node cache: 4942987263
node cache: stored: 9921902(100.00%), storage efficiency: 50.58% (dense blocks: 154, sparse nodes: 9178004), hit rate: 100.42%

Osm2pgsql took 570s overall

real    9m30,090s
user    2m19,789s
sys     0m23,298s

Europa

time osm2pgsql --create --slim \
        -C 16000 --number-processes 4 -k -m \
        --style /opt/osm/local_style/openstreetmap-carto.style --multi-geometry \
        -U psql -c -d gis \
        --flat-nodes /mnt/3tb/flatnodes \
        /mnt/3tb/europe-latest.osm.pbf

osm2pgsql version 0.92.1 (64 bit id space)

Using built-in tag processing pipeline
Using projection SRS 3857 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=16000MB, maxblocks=256000*65536, allocation method=11
Mid: loading persistent node cache from /mnt/3tb/flatnodes
Allocated space for persistent node cache file
Maximum node in persistent node cache: 0
Mid: pgsql, scale=100 cache=16000
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: /mnt/3tb/europe-latest.osm.pbf
Using PBF parser.
Processing: Node(737290k 2355.6k/s) Way(0k 0.00k/s) Relation(0 0.00/s)Maximum node in persistent node cache: 1984954367
node cache: stored: 737296000(100.00%), storage efficiency: 60.93% (dense blocks: 86734, sparse nodes: 249737386), hit rate: -nan%
Osm2pgsql failed due to ERROR: failed to uncompress data: data error

real    5m13,909s
user    7m47,838s
sys     0m14,349s