Opened 8 years ago

Closed 8 years ago

#4097 closed defect (fixed)

osm2pgsql: Postgres errors during tile rendering

Reported by: garmini Owned by: jburgess777@…
Priority: minor Milestone:
Component: osm2pgsql Version:
Keywords: Cc:



seems (IMHO) that there is a problem with OSM data import with osm2pgsql in latest revision (27106). I use a common setup with PostgreSQL/GIS V9.0, Mapnik 0.7.1 and Tirex 0.2.0 for tile rendering on Ubuntu 10.04 Server. I did a fresh update import for Germany (germany.osm.pbf) and import went fine. However after restarting all services I found that I have tons of errors in postgres logs showing broken querys like this:

2011-11-21 09:34:30 CET ERROR:  geometry contains non-closed rings
2011-11-21 09:34:30 CET STATEMENT:  SELECT AsBinary("way") AS geom,"amenity","building","railway" from 
	      (select way,building,leisure,railway,amenity,aeroway from planet_osm_polygon
	       where (building is not null and building != 'no')
	          or railway='station'
	          or amenity='place_of_worship'
	          or aeroway='terminal'
	       order by z_order,way_area desc) as buildings
	       WHERE "way" && SetSRID('BOX3D(919690.324327241 6242153.477880632,1271912.150665332 6594375.304218722)'::box3d, 900913)


2011-11-21 09:25:43 CET ERROR:  Operation on two geometries with different SRIDs
2011-11-21 09:25:43 CET STATEMENT:  SELECT AsBinary("way") AS geom,"landuse","military","natural" from 
	      (select way,aeroway,amenity,landuse,leisure,man_made,military,"natural",power,shop,tourism,name
	       from planet_osm_polygon
	       where landuse is not null
	          or leisure is not null
	          or shop is not null
	          or aeroway in ('apron','aerodrome')
	          or amenity in ('parking','university','college','school','hospital','kindergarten','grave_yard')
	          or military in ('barracks','danger_area')
	          or "natural" in ('field','beach','heath','mud','wood')
	          or power in ('station','sub_station')
	          or tourism in ('attraction','camp_site','caravan_site','picnic_site','zoo')
	       order by z_order,way_area desc
	      ) as leisure
	       WHERE "way" && SetSRID('BOX3D(587036.3772301532 6222585.598639626,1291480.029906339 6927029.251315814)'::box3d, 900913)

When looking at tirex-status I see thousands of "count_errors". Currently around 30% of all tile request result in errors. I use a slightly modified osm.xml, but only with some additional layers in setup. This setup worked for a long time for me, so I guess it has todo with the latest (highly welcome) changes in osm2pgsql? Any ideas?

Thanks and cheers bzrudi

Change History (1)

comment:1 Changed 8 years ago by garmini

Resolution: fixed
Status: newclosed


no idea why, but a new import using exactly the same config fixed the problem for me. Maybe there was a problem with the germany extract.

cheers bzrudi

Note: See TracTickets for help on using tickets.