Frederik Ramm schrieb:
Da aber wiederum ST_Centroid 20x so schnell ist wie ST_PointOnSurface, koennte man ja einen Kompromiss machen und ST_Centroid benutzen, das waere dann nur noch doppelt so langsam wie ein einfaches Abfragen des Weges ;-)
Hmm bei mir nicht ;) In meinem Testcase ist ST_Centroid bei Polygonen 20x langsamer als einfaches abfragen des weges. Lg, Peter osm_mapnik=> explain analyze select ST_Centroid(way) from planet_polygon where ST_IsValid(way) limit 100000; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.00..93404.04 rows=100000 width=1692) (actual time=117.619..13097.848 rows=100000 loops=1) -> Seq Scan on planet_polygon (cost=0.00..4270042.44 rows=4571582 width=1692) (actual time=117.617..13027.815 rows=100000 loops=1) Filter: st_isvalid(way) Total runtime: 13134.124 ms (4 rows)