[postgis-users] touches function problem

caij at lreis.ac.cn caij at lreis.ac.cn
Tue Nov 13 03:42:26 PST 2007


Hi all,
  I have a table which has 279,370 records.And the geometry type is polygon and multipolygon.When I used the touches function to get the neighbor polygons of one polygon,it takes me 7-10 seconds to process it.And to my program,it is unbearable. (the processing sentence is below!) Who can tell me how to improve the speed?
   Wait for ur answers!
   Good Luck!

select astext(wkb_geometry),ogc_fid,ischanged,prechanged,nrings(wkb_geometry) as nrings,numgeometries(wkb_geometry) as numgeometries from (select ogc_fid,wkb_geometry,ischanged,prechanged from quanbj1_10000_6_9_fullscreen where wkb_geometry && (select wkb_geometry from quanbj1_10000_6_9_fullscreen where ogc_fid=149648 ) and (level=1) or (level>1 and isleaf=1) or (level>1 and child_level<1 )) as temprec where touches(wkb_geometry,(select wkb_geometry from quanbj1_10000_6_9_fullscreen where ogc_fid=149648))




More information about the postgis-users mailing list