mapnik рендерит только точки

Сломалась моя локальная рендерилка. Начал устанавливать заново и понял что за год все изменилось…вообще все. Целый вечер ушел на танцы с бубном вокруг postgis, osm2pgsql и mapnik. И вот когда все версии сошлись всплыл глюк который второй день не могу побороть. Рендерятся только POI. Выглядит это так:

http://phoenix.novsu.ac.ru/image.png (5000x10000)

Может кто сталкивался с подобными проблемами? Ниже немного диагностики:

В базе следующие таблицы:


gis=# \d+
                           List of relations
 Schema |        Name        | Type  | Owner |    Size    | Description
--------+--------------------+-------+-------+------------+-------------
 public | geometry_columns   | table | root  | 8192 bytes |
 public | planet_osm_line    | table | root  | 0 bytes    |
 public | planet_osm_nodes   | table | root  | 1384 kB    |
 public | planet_osm_point   | table | root  | 104 kB     |
 public | planet_osm_polygon | table | root  | 0 bytes    |
 public | planet_osm_rels    | table | root  | 24 kB      |
 public | planet_osm_roads   | table | root  | 0 bytes    |
 public | planet_osm_ways    | table | root  | 1752 kB    |
 public | spatial_ref_sys    | table | root  | 2944 kB    |

planet_osm_line, planet_osm_polygon, planet_osm_polygon, planet_osm_roads - абсолютно пустые. Возможно так надо? Не нашел описания.

Вывод osm2pgsql выглядит так (вроде ничего критического):


#osm2pgsql -c -s -d gis map_novgorod.osm
osm2pgsql SVN version 0.69-exported

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE:  table "planet_osm_line_tmp" does not exist, skipping
Setting up table: planet_osm_polygon
NOTICE:  table "planet_osm_polygon_tmp" does not exist, skipping
Setting up table: planet_osm_roads
NOTICE:  table "planet_osm_roads_tmp" does not exist, skipping
Mid: pgsql, scale=100, cache=800MB, maxblocks=102401*8192
Setting up table: planet_osm_nodes
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_nodes_pkey" for table "planet_osm_nodes"
Setting up table: planet_osm_ways
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_ways_pkey" for table "planet_osm_ways"
Setting up table: planet_osm_rels
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_rels_pkey" for table "planet_osm_rels"

Reading in file: map_novgorod.osm
WARNING: Found Out of order node 281917304 (2372461,888) - this will impact the cache efficiency
Processing: Node(33k) Way(8k) Relation(0k)
Node stats: total(33064), max(840236497)
Way stats: total(8868), max(70417731)
Relation stats: total(37), max(409962)

Going over pending ways
processing way (3k)

Going over pending relations

node cache: stored: 7535(22.79%), storage efficiency: 0.43%, hit rate: 22.35%
Stopping table: planet_osm_nodes
Stopping table: planet_osm_ways
Committing transaction for planet_osm_roads
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Stopped table: planet_osm_nodes
Building index on table: planet_osm_ways
Sorting data and creating indexes for planet_osm_line
Sorting data and creating indexes for planet_osm_roads
Sorting data and creating indexes for planet_osm_polygon
Stopping table: planet_osm_rels
Building index on table: planet_osm_rels
Stopped table: planet_osm_rels
Completed planet_osm_line
Committing transaction for planet_osm_point
Completed planet_osm_roads
Sorting data and creating indexes for planet_osm_point
Completed planet_osm_polygon
Completed planet_osm_point
Stopped table: planet_osm_ways

Проблем с памятью быть не должно, тестирую на небольшой кусочке карты.

osm.xml: http://phoenix.novsu.ac.ru/osm.xml (~350Кб)
карта: http://phoenix.novsu.ac.ru/map_novgorod.osm (~8Мб)

Попробуйте явно указать расположение default.style (-S)

Результат тот же :frowning:

А сам default.style адекватный?

А как, примерно, должен выглядеть адекватный default.style?

У меня вот:


# This is the style file that matches the old version of osm2pgsql, which
# did not make distinctions between tags for nodes and for ways. There are a
# number of optimisations that can be applied here. Firstly, certain tags
# only apply to only nodes or only ways. By fixing this we reduce the amount
# of useless data loaded into the DB, which is a good thing. Possible
# optimisations for the future:

# 1. Generate this file directly from the mapnik XML config, so it's always
# optimal

# 2. Extend it so it can understand that highway=tertiary is for ways and
# highway=bus_stop is for nodes

# Flags field isn't used much yet, expect if it contains the text "polygon"
# it indicates the shape is candidate for the polygon table. In the future I
# would like to be able to add directives like "nocache" which tells
# osm2pgsql that it is unlikely this node will be used by a way and so it
# doesn't need to be stored (eg coastline nodes). While in essence an
# optimisation hack, for --slim mode it doesn't matter if you're wrong, but
# in non-slim you might break something!

# Also possibly an ignore flag, for things like "note" and "source" which
# can simply be deleted. (In slim mode this is, does not apply to non-slim
# obviously)

# OsmType  Tag          DataType     Flags
node,way   note         text         delete   # These tags can be long but are useless for rendering
node,way   source       text         delete   # This indicates that we shouldn't store them

node,way   access       text         linear
node,way   addr:flats   text         polygon
node,way   addr:housenumber    text  linear
node,way   addr:interpolation  text  linear
node,way   admin_level  text         linear
node,way   aerialway    text         linear
node,way   aeroway      text         polygon
node,way   amenity      text         nocache,polygon
node,way   area         text         # hard coded support for area=1/yes => polygon is in osm2pgsql
node,way   barrier      text         linear
node,way   bicycle      text         nocache
node,way   bridge       text         linear
node,way   boundary     text         linear
node,way   building     text         polygon
node         capital      text         linear
node,way   construction text         linear
node,way   cutting      text         linear
node,way   disused      text         linear
node       ele          text         linear
node,way   embankment   text         linear
node,way   foot         text         linear
node,way   highway      text         linear
node,way   historic     text         polygon
node,way   horse        text         linear
node,way   junction     text         linear
node,way   landuse      text         polygon
node,way   layer        text         linear
node,way   learning     text         linear
node,way   leisure      text         polygon
node,way   lock         text         linear
node,way   man_made     text         polygon
node,way   military     text         polygon
node,way   motorcar     text         linear
node,way   name         text         linear
node,way   natural      text         polygon  # natural=coastline tags are discarded by a hard coded rule in osm2pgsql
node,way   oneway       text         linear
node,way   operator     text         linear
node       poi          text
node,way   power        text         polygon
node,way   power_source text         linear
node,way   place        text         linear
node,way   railway      text         linear
node,way   ref          text         linear
node,way   religion     text         nocache
node,way   residence    text         linear
node,way   route        text         linear
node,way   service      text         linear
node,way   shop         text         polygon
node,way   sport        text         polygon
node,way   tourism      text         polygon
way        tracktype    text         linear
node,way   tunnel       text         linear
node,way   waterway     text         polygon
node,way   width        text         linear
node,way   wood         text         linear
node,way   z_order      int4         linear # This is calculated during import
way        way_area     real                # This is calculated during import

# If you're interested in bicycle routes, you may want the following fields
# To make these work you need slim mode or the necessary data won't be remembered.
#way       lcn_ref      text     linear
#way       rcn_ref      text     linear
#way       ncn_ref      text     linear
#way       lcn          text     linear
#way       rcn          text     linear
#way       ncn          text     linear
#way       lwn_ref      text     linear
#way       rwn_ref      text     linear
#way       nwn_ref          text     linear
#way       lwn              text     linear
#way       rwn              text     linear
#way       nwn              text     linear
#way       route_pref_color text     linear
#way       route_name       text     linear

# The following entries can be used with the --extra-attributes option
# to include the username, userid, version & timstamp in the DB
#node,way  osm_user       text
#node,way  osm_uid        text
#node,way  osm_version    text
#node,way  osm_timestamp  text


Этот вполне адекватный.

А по таблицам?

planet_osm_line, planet_osm_polygon, planet_osm_polygon, planet_osm_roads - они могут быть пустые? Если нет, то это позволит сузить поиски проблемы.