Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

osm2pgsql: Postgres errors during tile rendering #4097

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

osm2pgsql: Postgres errors during tile rendering #4097

openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: garmini
[Submitted to the original trac issue database at 12.31am, Monday, 21st November 2011]

Hi,

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)

and

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

@openstreetmap-trac
Copy link
Author

Author: garmini
[Added to the original trac issue at 10.22am, Monday, 28th November 2011]

Hi,

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant