Hi,

i'm trying to compute centroids of clusters of geoms via a postgis query.

something like this:

select st_centroid(unnest(st_clusterwithin(geom,0.00045))) geom
  from assoc3_house

This query is used in a sql-layer (WFS) and gives reasonable results. :)

BUT: the performance is very, very poor. Tablesize is about 460.000
nodes and there is a spatial index on geom. *Runtime 3-4 minutes.*

In PSQL the same query (of course with the corrisponding bbox) is
running in 2-3 seconds giving the same results.

Any idea what is going on and what i can do?

regards

walter

-- 
My projects:

Admin Boundaries of the World <https://wambachers-osm.website/boundaries>
Missing Boundaries
<https://wambachers-osm.website/index.php/projekte/internationale-administrative-grenzen/missing-boundaries>
Emergency Map <https://wambachers-osm.website/emergency>
Postal Code Map (Germany only) <https://wambachers-osm.website/plz>
Fools (QA for zipcodes in Germany) <https://wambachers-osm.website/fools>
Postcode Boundaries of Germany <https://wambachers-osm.website/pcoundaries>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to